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
Npp v8.6 cursor oddity with copy paste into a 2x0 column #14466
Comments
Strange. I was about to write that I couldn’t reproduce this... then I happened to switch to a different tab and switch back. On switching back, I got the two-line cursor displayed at column 2 with the status line saying column 17. |
@Coises 1111111111111111CCCCCCCCCCCCAAAA
2222222222222222CCCCCCCCCCCCBBBB
3333333333333333CCCCCCCCCCCC at the bottom but intended to have 1111111111111111AAAA
2222222222222222BBBB
3333333333333333CCCCCCCCCCCC I will use that pattern for this comment. I was not switching tabs but to make sure I'm running a reproducible of npp I fired up a copy of a barebones portable npp8.6 and got the same results as you. After the paste the cursors looked good and was after the If I re-try the experiment then after the Ctrl-V paste I did a right arrow. The cursors went to column 30 and the status line says 30. Were someone just looking and testing they would say that npp 8.6 worked correctly other than that the status line was wrong for a moment. As the only differences between my installed copy and bare bones are DSpellCheck (1.5) and PythonScript (2) I tried disabling those plugins. The cause of the difference in results was PythonScript (2). When I have it disabled I get your results. I tried adding PythonScript (2) to the bare bones portable but that did not break npp 8.6 enough to match what I see on my installed copy. |
I did more testing and discovered that the version of misbehavior that @Coises observed also happens with npp 8.3.3 and 8.5.8 and thus it's no longer just a npp 8.6 issue. I experimented more and discovered the reason my installed copy of npp shows the behavior right away, instead of when I switch tabs is that I had:
from Npp import editor, editor1, editor2, SCINTILLANOTIFICATION, INDICATORSTYLE
def revert_url_indicator(args):
editor1.indicSetHoverStyle(8, INDICATORSTYLE.TEXTFORE)
editor2.indicSetHoverStyle(8, INDICATORSTYLE.TEXTFORE)
editor.callbackSync(revert_url_indicator, [SCINTILLANOTIFICATION.UPDATEUI])
|
This is also posted to the npp forums Npp v8.6 cursor oddity with copy paste into a 2x0 column
I have two columns separated by tabs:
I wanted to copy paste the
CCCCCCCCCCCCC
in front of theAAAA
andBBBB
to createCCCCCCCCCCCCC
(I included the space in the selection) on the 3... lineCtrl-C
to load the selected text into the copy/paste bufferCCCCCCCCCCCCC
BBBB
AAAA
andBBBB
CCCCCCCCCCC AAAA
andCCCCCCCCCCC BBBB
as desired and expected.The v8.6 surprise and unexpected result is that the cursors moved backwards to column 2 of the 1.... and 2... lines.
Also, while the cursors are on column 2 the status line says the cursors are on column 17. If I right arrow the cursors move to column 3 and the status line now says they are on column 3.
With v8.5.8 the cursors would be on column 17 just after the newly pasted
CCCCCCCCCCC
and which is also just before theAAAA
andBBBB
. This is what I'm used to and what I suspect most people expect.Experimentation with v8.6 finds that the distance the cursor's move backwards depends on the length of the
CCCC...
data I'm copying. If it's a four characterCCCC
then the cursors move backwards four characters.The
111...
and222...
are slightly different lengths. Experimentation shows that changing these also changes the outcome but I did not experiment enough to detect the pattern.While my previous example used tabs to separate the
111...
and222...
from theAAAA
andBBBB
I get the same results had the starting data been what's below though the cursors go backwards 12 characters to column 5.While the cursors are on column 5 the status line says the cursors are on column 17. If I right arrow the cursors move to column 6 and the status line now says they are on column 6.
The text was updated successfully, but these errors were encountered: