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
CURRENT_LINE and CURRENT_COLUMN should be one-based not zero-based #8679
Comments
👍 I have a I've mentioned this issue a couple of times as a "BTW comment" in other threads. And another "BTW comment": I don't how and why but in #8629 (comment) I thought you were referring to |
(For benefit of anyone else reading:) Well, you mean in your patched/forked version of N++, which sounds highly customized. Okay, I will go ahead and attempt a change to existing functionality, rather than adding two new expansions as I suggested above. If anyone objects to it, we can always fall back to doing the new additions... |
The good responsible moderator! :)
👍 |
One thing I do, on my Anyway, I use the Just an additional scenario for why this being zero-based is not the greatest behavior. |
Description of the Issue
To be user-useful, the
$(CURRENT_LINE)
and$(CURRENT_COLUMN)
expansions offered in the Run menu's Run... > The Program to Run box should be "one-based" and not "zero-based".Steps to Reproduce (STR) the Issue
cmd /c echo CURRENT_LINE=$(CURRENT_LINE) CURRENT_COLUMN=$(CURRENT_COLUMN) && pause
:Run
button.Expected Behavior
A CMD window opens with
CURRENT_LINE=1 CURRENT_COLUMN=1
in it.Actual Behavior
A CMD window opens with
CURRENT_LINE=0 CURRENT_COLUMN=0
in it:The line and column data is always "one less" than it should be, for any line and any column the caret is on.
Additional
If it is thought that users are using these commands as they are, the "fix" could be to implement new expansion variables, suggest:
$(CURRENT_LINE1)
and$(CURRENT_COLUMN1)
See also Position in "Vertical Edge" and "Go To" should be "one-based" #8629 (comment)
Debug Information
Notepad++ v7.8.9 (32-bit)
Build time : Jul 15 2020 - 20:26:50
Path : C:\.............\npp.7.8.9.bin\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1809
OS Build : 17763.1039
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll PythonScript.dll
The text was updated successfully, but these errors were encountered: