Tk Source Code

View Ticket
Login
Ticket UUID: 1754051
Title: Ignore multiple whitespace at end of word-wrapped line
Type: Bug Version: None
Submitter: kjnash Created on: 2007-07-14 17:36:01
Subsystem: 18. [text] Assigned To: fvogel
Priority: 8 Severity: Minor
Status: Closed Last Modified: 2016-10-09 18:31:29
Resolution: Duplicate Closed By: fvogel
    Closed on: 2016-10-09 18:31:29
Description:
In '-wrap word' mode, ignore multiple whitespace at the right of display lines - do not wrap it round to the start of the next display line.

At the moment the excess is ignored only if it will fit at the end of the display line.

This feature could be implemented by bindings, but it would be more appropriate if it were part of the widget's internal word-wrap algorithm.
User Comments: fvogel added on 2016-10-09 18:31:29:

Fix of [1082213fff] merged to core-8-6-branch and trunk.


jan.nijtmans added on 2016-10-03 11:36:27:
Agreed with DKF, this should be a bug. Changed now

fvogel added on 2016-09-30 14:35:13:

Duplicate of [1082213fff], which I believe I have just fixed. See branch [bug-1082213fff].

Please try and comment whether it's now OK in your opinion. Note the my proposed solution does not make the widget scroll horizontally when the user moves the insert mark through the excess whitespace.


kjnash added on 2007-07-25 05:54:28:
Logged In: YES 
user_id=991282
Originator: YES

Possible reasons for the status quo:
(1) To make the whitespace obvious to the user, and let the user edit it.
(2) To avoid automatic horizontal scrolling of the widget if the user moves the insert mark through the excess whitespace.  One purpose of wrapping is to eliminate horizontal scrolling.

The solution is to some extent a matter of taste.  I would prefer not to have excess whitespace wrapped around, even if the penalty is that (1) I cannot see or edit it because it is hidden/elided, or (2) in this corner case the widget can be horizontally scrolled.

dkf added on 2007-07-24 04:01:55:
Logged In: YES 
user_id=79902
Originator: NO

I can't think why we don't do this already. So arguably a bug, not a FRQ.