Skip to content
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 position is not reverted by Undo in splitted ui-tab #5285

Open
Alexey-T opened this issue Nov 22, 2023 · 5 comments
Open

caret position is not reverted by Undo in splitted ui-tab #5285

Alexey-T opened this issue Nov 22, 2023 · 5 comments

Comments

@Alexey-T
Copy link
Owner

Alexey-T commented Nov 22, 2023

make new tab, split it, and type in the right part.

spl

call 'undo' also in the right part -> text undoes OK but caret stays at old position in the right part (at line 4, in the middle column).

@Alexey-T Alexey-T changed the title bug with caret position after ' bug with caret position after Undo in splitted ui-tab Nov 22, 2023
@Alexey-T Alexey-T added the bug label Nov 22, 2023
@MiroslavMatas
Copy link

26sec.mp4

these steps?

@Alexey-T
Copy link
Owner Author

what if you run 'Undo' by a hotkey, instead of Cmd Palette?

@MiroslavMatas
Copy link

the same like on the video - doesn't matter if Undo by hotkey and/or by Cmd…

@Alexey-T
Copy link
Owner Author

Hmmmm. I reproduced it also on macOS. will check on Win32 later.

@Alexey-T Alexey-T changed the title bug with caret position after Undo in splitted ui-tab caret position is not reverted by Undo in splitted ui-tab Nov 27, 2023
@Alexey-T
Copy link
Owner Author

Alexey-T commented Mar 8, 2024

current code in atstrings.pas has events to change carets/markers/attribs during Undo action

    property OnGetCaretsArray: TATStringsGetCarets read FOnGetCaretsArray write FOnGetCaretsArray;
    property OnGetMarkersArray: TATStringsGetMarkers read FOnGetMarkersArray write FOnGetMarkersArray;
    property OnGetAttribsArray: TATStringsGetAttribs read FOnGetAttribsArray write FOnGetAttribsArray;
    property OnSetCaretsArray: TATStringsSetCarets read FOnSetCaretsArray write FOnSetCaretsArray;
    property OnSetMarkersArray: TATStringsSetMarkers read FOnSetMarkersArray write FOnSetMarkersArray;
    property OnSetAttribsArray: TATStringsSetAttribs read FOnSetAttribsArray write FOnSetAttribsArray;

but code lacks events for the paired editor (which has the same Strings object).
so code needs additional events like

  • OnGetCaretsArray2
  • OnGetMarkersArray2
  • etc

and editor must set these new events when editor-frame is splitted. not hard work. but not interesting. maybe later.

@Alexey-T Alexey-T added enhancement and removed bug labels Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants