Editing same text in different views/instances
-
Did this:
- Open simple text, with 1k lines
- Put curson on specific position where i stopped reading
- View\Move-Clone…\Open in new inst. ( to edit same text )
- I appended text at the start of the document
- Saved
- Switched to the original view, agreed on reload.
- Text shifted down, but cursor stayed in fixed position.
My expectations:
- cursor should be at the same place relative to text where i left/put
v8.4.8x64 on Win10x64
Thank you.
-
IMO only, your expectation is not reasonable.
-
@Alan-Kilborn Cursor is a pointer at a specific place in text, and should be fixed relative to text where was left.
-
Again, not reasonable per your “did this” scenario. But if you want to create a feature-request/bug-report for this, feel free to do so.
-
@Izbae-Bav said in Editing same text in different views/instances:
Cursor is a pointer at a specific place in text, and should be fixed relative to text where was left.
From my experiments, it is. Check the position:
If I purposely place the caret (let’s use that terminology instead) at position 308 in my first view and then in the second view insert text at the beginning of the document (i.e., before position 308) and then switch back, my caret in the original view is still at position 308, but of course since the text has shifted, it is no longer “visually” at the place you “expect”.
Cheers.
-
@Michael-Vincent Caret gives the visual confirmation where new text is gonna be input, meaning it’s related/fixed to the place in text, and should be staying there ( relative to the text ) until moved by the user.
Example: sublime_text.
And before you get angry, using both for different tasks.
Thanks. -
@Izbae-Bav said in Editing same text in different views/instances:
it’s related/fixed to the place in text
I think this is what @Alan-Kilborn means by “not reasonable” expectations. How is the first instance of Notepad++ to know that the second separate instance of Notepad++ has made edits to the file of what size and what position? The only trigger it gets is that the file changed on disk. There is no extra meta data about how much text got inserted where so no calculation can be made about current position +/- amount of new added text = new place to put caret so it visually appears in the same part of the text you “expect” vs. the actual position the caret is already in (which again has “moved” because of the new text").
Not angry, use any editor you like. Also, feel free to open a feature request for this - though I’m not sure if it will gain traction as at first blush I don’t see how it would be probable.
Cheers.
-
@Alan-Kilborn Thanks, will do feature/bug-fix request.
-
@Izbae-Bav said in Editing same text in different views/instances:
will do feature/bug-fix request.
Please reference this community discussion in the Github Issue for further context.
Cheers.
-
@Michael-Vincent There is a different ways that views can track text in the same opennned documment, like “shared memmory”.
Thanks, looks like a bug for me, so gonna submit this issue later. -
@Izbae-Bav said in Editing same text in different views/instances:
There is a different ways that views can track text in the same opennned documment, like “shared memmory”.
I think your keyboard is stuck.
@Michael-Vincent said:
I think this is what @Alan-Kilborn means by “not reasonable” expectations. How is the first instance of Notepad++ to know that the second separate instance of Notepad++ has made edits to the file of what size and what position? The only trigger it gets is that the file changed on disk. There is no extra meta data about how much text got inserted where so no calculation can be made about current position +/- amount of new added text = new place to put caret so it visually appears in the same part of the text you “expect” vs. the actual position the caret is already in (which again has “moved” because of the new text").
Exactly, but I wasn’t going to waste time explaining this to someone that won’t be convinced anyway. :-)
There are so many ways in which multiple-instances of Notepad++ could play nicer together. And for 99% of them I wouldn’t want to see Notepad++'s limited development staff spending time on them. I want more core, important, text editing features to be worked on.
-
@Alan-Kilborn “importance” is relative to individual views.
In “subl” editor works as expected, in NP++ does not. I think it’s a bug, not fully implemented feature after adding ability to edit same text in different views/instanses.
Developers is gonna decide which things are important, and fixing a bug is a higher priority than implementing new feature. -
@Izbae-Bav said in Editing same text in different views/instances:
Developers … gonna decide which things are important, and fixing a bug is a higher priority than implementing new feature.
Developers aren’t going to consider this a bug.
Nor are they going to consider it important.
Trust me on this.
gonna submit this issue later
Did you create the “issue”? Forum etiquette dictates you post here again with the issue number/link.
-
@Alan-Kilborn Not yet, considering fixing this bug by myself when i have more free time.
-
@Izbae-Bav said in Editing same text in different views/instances:
considering (edit: doing this) by myself when i have more free time.
(side note: I am confident this will never happen)
It still needs a “issue” created, if you hope to contribute a change to Notepad++. Changes are not accepted without prior issue creation.
-
@Alan-Kilborn Good to know, thanks.