Bookmarks are updated wrongly after pasting lines

Did you find any problems using this software? Please post here...
main Alexey
Posts: 2543
Joined: 25.08.2021 18:15

Re: Bookmarks are updated wrongly after pasting lines

Post by main Alexey »

Seems no simple way.
itsmyname
Posts: 17
Joined: 15.09.2023 13:34

Re: Bookmarks are updated wrongly after pasting lines

Post by itsmyname »

If I insert just one line, the bookmark position updates correctly, but if I insert multiple lines, the bookmark shifts one line higher. This happens with the beta version (one .exe file) and the instance I'm already using.
main Alexey
Posts: 2543
Joined: 25.08.2021 18:15

Re: Bookmarks are updated wrongly after pasting lines

Post by main Alexey »

look how I tried to reproduce it.
i have text with 3 bookmarks.
i try to insert such blocks above bookmarks:

1. single-line block
[ddd]

2. single line with newline at end
[ddd
]

3. 3-lines block with ending newline
[ddd
ddd
ddd
]

4. 3-lines block without ending newline
[ddd
ddd
d]

I paste at line start. and not at line start too.
cannot see the bug! give me your exact 'steps', please.
main Alexey
Posts: 2543
Joined: 25.08.2021 18:15

Re: Bookmarks are updated wrongly after pasting lines

Post by main Alexey »

I mean I need exact sample document text (of fragment before the bookmark), exact contents of clipboard before pasting, and exact caret position.
main Alexey
Posts: 2543
Joined: 25.08.2021 18:15

Re: Bookmarks are updated wrongly after pasting lines

Post by main Alexey »

I found how to reproduce this bug.
https://github.com/Alexey-T/CudaText/is ... 2799899489
To-fix.
main Alexey
Posts: 2543
Joined: 25.08.2021 18:15

Re: Bookmarks are updated wrongly after pasting lines

Post by main Alexey »

hey, user. I fixed that issue now. will be in the next update (seems 1.223.0.x), pls wait.
mix-7
Posts: 906
Joined: 11.05.2018 11:02

Re: Bookmarks are updated wrongly after pasting lines

Post by mix-7 »

Fixed for CudaText 1.223.5.0, linux-x86_64-qt6, fpc 3.2.3
Thanks!
But no fix in https://cudatext.github.io/history.txt
main Alexey
Posts: 2543
Joined: 25.08.2021 18:15

Re: Bookmarks are updated wrongly after pasting lines

Post by main Alexey »

that 'bookmarks shift' fix was 'almost mentioned' in this line:
- fix: few regressions in 1.222.3 in reworked TextInsert method
mix-7
Posts: 906
Joined: 11.05.2018 11:02

Re: Bookmarks are updated wrongly after pasting lines

Post by mix-7 »

Again the bookmark moved on 2 lines up for some reason

Recently updated to Cudatext 1.223.5.2, Linux-X86_64-QT6, FPC 3.2.3
main Alexey
Posts: 2543
Joined: 25.08.2021 18:15

Re: Bookmarks are updated wrongly after pasting lines

Post by main Alexey »

please, write steps to repeat it.
can it be repeated on _clean_ Cud? (we had problem in Markdown_Editing plugin with bookmarks, solved it in plugin).
Post Reply