-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caret not visible if "Go to -> Offset" is EOL #9125
Comments
So for Windows (CRLF) files, the position between the CR and the LF is treated specially. In other words, you can't normally "get there". Maybe this is another example of "what is position, really?" I think "position" should be purely user-level. No notion of a unicode character (potentially) taking up 4 "units" of position, and perhaps no notion of CRLF in Windows files taking up 2 "units" of position?? Hmm. More about position here: #9095 |
I realized that.
I think that "Pos" should be "number of characters BEFORE the caret + 1".
This seems correct.
The currently implemented "Pos" is correct in this case: it shows the number of characters BEFORE the caret + 1. |
BTW, perhaps I shouldn't derail this issue. |
The caret should be visible at the end of that line. IOW: simulate manually placing the caret there.
This wouldn't work properly if there isn't a line below. :) |
In developing a solution for multibyte UTF-8 characters (for 9101), it made sense that if a user tries to offset into the middle of a multibyte character, the caret would be placed after that multibyte character. |
Continued in #9101 (comment). |
STR:
Open a file formatted in "Windows (CR LF)".
Open the "Go to" dialog.
Select "Offset", enter an EOL position and run it.
(For example:
149
instylers.model.xml
).Result:
The caret is not visible.
(It also happens when opening NPP from the Command Line with the argument
-p
).Notepad++ v7.9.1 (32-bit)
Build time : Nov 2 2020 - 01:03:56
Path : C---\notepad++.exe
Admin mode : ON
Local Conf mode : ON
OS Name : Windows 7 Enterprise (32-bit)
OS Build : 7601.23964
Current ANSI codepage : 1255
Plugins : ComparePlus.dll HTMLTag_unicode.dll MenuIcons.dll PythonScript.dll _CustomizeToolbar.dll
The text was updated successfully, but these errors were encountered: