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

Handle dbclick in console output #5504

Closed
pintassilgo opened this issue May 6, 2024 · 3 comments
Closed

Handle dbclick in console output #5504

pintassilgo opened this issue May 6, 2024 · 3 comments
Labels

Comments

@pintassilgo
Copy link

The universal behavior on dbclicking a text is to select the word under mouse. It doesn't work in console output, only triple click to select the entire line.

@Alexey-T
Copy link
Owner

Alexey-T commented May 6, 2024

https://wiki.freepascal.org/CudaText#Console_panel

It's busy:
Double-click on memo lines starting with ">>>" repeats entered command (after ">>>" symbols).

@pintassilgo
Copy link
Author

Maybe at least on not ">>>" lines? If not intended to change the repeat command to other combination (like right click, middle click or single click).

@Alexey-T
Copy link
Owner

Alexey-T commented May 6, 2024


procedure TfmConsole.MemoOnClickDbl(Sender: TObject; var AHandled: boolean);
var
  s: string;
  n: integer;
begin
  n:= EdMemo.Carets[0].PosY;
  if EdMemo.Strings.IsIndexValid(n) then
  begin
    s:= EdMemo.Strings.Lines[n];
    if StartsStr(cConsolePrompt, s) then
    begin
      Delete(s, 1, Length(cConsolePrompt));
      DoRunLine(s);
    end
    else
      DoNavigate(Self);
  end;
  AHandled:= true;
end;  

so, if not on >>> line, it runs 'navigate to error' command. it may run it on ANY line.

@Alexey-T Alexey-T added the talk label May 6, 2024
@pintassilgo pintassilgo closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants