View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0020053||Lazarus||Other||public||2011-08-25 19:38||2011-08-26 02:46|
|Reporter||Flávio Etrusco (notifications not working)||Assigned To||Martin Friebe|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Product Version||0.9.31 (SVN)||Product Build|
|Target Version||Fixed in Version||0.9.31 (SVN)|
|Summary||0020053: SynEdit scrolls by one less (char) if caret is beyond MaxLeftChar|
|Description||Actually the scroll range is one less than it should.|
How to reproduce:
Type something in a SynEdit, copy to clipboard and do several pastes. While the caret is smaller than MaxleftChar (1024 by default) the editor scrolls to EOL and caret is shown. When caretX is greater than MaxleftChar then the caret doesn't show (goes one char beyond scroll range).
|Tags||No tags attached.|
|Fixed in Revision||32058|
Unfortunately I can not reproduce.
Please attach your EditorOptions.xml to ensure it is not setting related.
* To explain what I understand.
editor left border: [
editor right border:]
the first visible char in the line is the 1025th char of the line
[c1025 foo bar text ... foo]b|ar
"bar" is not yet visible, but the caret (according to the status bar info, is located in "bar" and hence the caret is not in the visible scree area?
* A few more questions:
- You are moving the caret on a line, that has itself more than 1024 chars. So the caret is not past-end-of-line when the issue occurs?
- Does it also occur if you move the caret on the past-eol space of a shorter line?
- does it change depending on the caret type (overwrite vs insert caret)?
- The line is made of only a-z0-9 space? No tabs, no accented or umlauted or other special chars?
editoroptions.xml (3,306 bytes)
Oops. Sorry for the faulty description. The problem happens when the Caret is at LengthOfLongestLine +1.
Ex. write a single line longer than MaxLeftChar (1024) and press 'End'. Here it scrolls to the point where last line char is at the last visible "column", there's no extra column for the caret to show, and it's not visible (I assume it's at the correct position, but out of the scroll range).
It also happens when you have another line of the same length (> 1024).
1&2) I hope the above answers EOL matters.
3) To my surprise, changing the caret type to 'overwrite' fixes the scroll range.
4) Yes. Actually I just pasted lots of "SynEdit1 " from the default text :)
Ok, I was able to reproduce. The trick is to size the editor window on the pixel exactly to a full char.
With a randomly sized window, I always got to see a half char at the end.
The issue consists of 2 problems:
1) The caret obeys the editors text area as cliprect. This is in case of a gutter on the right side. It would be wrong if the caret (especially "overwrite") would be displayed on the gutter. This clipping should only be needed if the synedit can not scroll, that would be, if the width of the text area is smaller than one char.
This cliprect was one pixel to small. So it over-clipped the caret.
This is fixed in r32056. You will now see half a caret at the end of the line
2) For the "insert" caret, normally no extra space is provided, as it usually fits on the "half visible char" at the end of the line (it only needs one pixel of this.
Of course that doesn't work if, the client rect is exactly sized to a multiply of charwidth.
Since the caret is displayed half and half on the 2 surrounding chars, with the over-clipping of 1 fixed, this displays half a caret. (still need fixing)
The "override" caret always needs a full extra char. That is why it works.
Fixed in r32058
Please test and close if ok
||Thanks, verified :)|
|2011-08-25 19:38||Flávio Etrusco (notifications not working)||New Issue|
|2011-08-25 19:38||Flávio Etrusco (notifications not working)||LazTarget||=> -|
|2011-08-25 19:38||Flávio Etrusco (notifications not working)||Widgetset||=> Win32/Win64|
|2011-08-25 19:44||Martin Friebe||Status||new => assigned|
|2011-08-25 19:44||Martin Friebe||Assigned To||=> Martin Friebe|
|2011-08-25 20:00||Martin Friebe||Note Added: 0051127|
|2011-08-25 20:00||Martin Friebe||Status||assigned => feedback|
|2011-08-25 20:00||Martin Friebe||Note Edited: 0051127|
|2011-08-25 23:09||Flávio Etrusco (notifications not working)||File Added: editoroptions.xml|
|2011-08-25 23:27||Flávio Etrusco (notifications not working)||Note Added: 0051141|
|2011-08-25 23:30||Flávio Etrusco (notifications not working)||Note Edited: 0051141|
|2011-08-25 23:46||Martin Friebe||LazTarget||- => 1.0|
|2011-08-25 23:46||Martin Friebe||Note Added: 0051144|
|2011-08-25 23:46||Martin Friebe||Status||feedback => assigned|
|2011-08-26 01:08||Martin Friebe||Note Added: 0051145|
|2011-08-26 01:47||Martin Friebe||Fixed in Revision||=> 32058|
|2011-08-26 01:47||Martin Friebe||Status||assigned => resolved|
|2011-08-26 01:47||Martin Friebe||Fixed in Version||=> 0.9.31 (SVN)|
|2011-08-26 01:47||Martin Friebe||Resolution||open => fixed|
|2011-08-26 01:47||Martin Friebe||Note Added: 0051146|
|2011-08-26 01:47||Martin Friebe||Target Version||=> 0.99.0|
|2011-08-26 02:46||Flávio Etrusco (notifications not working)||Status||resolved => closed|
|2011-08-26 02:46||Flávio Etrusco (notifications not working)||Note Added: 0051147|