Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2025-10

SynEdit: Close completion box on Backspace when CurrentString is empty

9 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

eoli

Hello everyone?

I?ve made a small improvement to SynEdit to make the completion behavior smoother.
However, I?m currently unable to merge it because the pipeline cannot run on my fork.
Could someone please help me resolve this? Thanks!

------------
When completion popup is active and CurrentString is empty, pressing Backspace now both deletes the trigger character (e.g. '.') and closes the completion box.

This makes the completion workflow smoother ? users can type '.', get instant completion, and press Backspace to delete '.' and close popup, just like modern editors (VSCode, Sublime, etc).

To achieve seamless experience, set Editor ? Completion and Hints ? Delay = 0.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20251029/89acfbd9/attachment.htm>

Reply by email

Juha Manninen
to eoli

On Wed, Oct 29, 2025 at 8:47?AM eoli via lazarus <

Show quoted text 8 lines
wrote: I?ve made a small improvement to SynEdit to make the completion behavior smoother. However, I?m currently unable to merge it because the pipeline cannot run on my fork. Could someone please help me resolve this? Thanks!

Pipeline?
You can push to your fork in any case, can't you?
You can also create a patch and send it here or upload to an issue report.

Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20251029/4c586eb1/attachment.htm>

Reply by email

Martin Frb
to eoli: Hello everyone? I?ve made a small improvement to SynEdit to make the completion behavior…
eoli wrote 5 lines
Hello everyone? I?ve made a small improvement to SynEdit to make the completion behavior smoother. However, I?m currently unable to merge it

You mean "to create a merge request"?

?because the pipeline cannot run on my fork. Could someone please help me resolve this? Thanks!

I don't know which error you get, but you can supply it as a patch.

Also, you should be able to create a Merge request, even if the pipeline fails. We can still pull the request's branch and merge it locally.

When completion popup is active and CurrentString is empty, pressing Backspace now both deletes the trigger character (e.g. '.') and closes the completion box.

Nice.

Probably that should be an option. Otherwise users will have their workflow disturbed, if the are used to hold backspace (keep pressed for longer) to delete the entire "prefix" (CurrentString) to start another prefix.

E.g. if one is not sure what prefix the completion start with (or what it contains), and one wants to try a few word-fragments. Then if "Form1.maybe " does not list the expected completion, hold backspace till back at the dot, and try "Form1.perhaps".

-------------------

How is it expected to behave if you have completion always enabled: "Automatically invoke on typing" ? (maybe with "only if word is longer or equal than" = 3 ?

Either way will be ok. And I have no preference. (i.e. NO option needed for the below choices)

1)
So if I have a variable MyLongNameValue
and I type

? If MyL

then the completion pops up, after I press "L".

Then I type (with the completion open "o", so I have ? if MyLo

If I use backspace now, should the completion box close when I am about to delete the "L"? Or should I be able to go back to M, and it close when I try to delete the SPACE in front of the M?

2)
Also, if "at the M" then is that the point configured in "only if longer", or the point where the pop up opens.

Because, if the completion still is set to a small delay, then I could (fast enough) type
? if MyLon

and the completion would only open when I briefly pause after the "n", then would the backspace close the completion when I try to delete the "n"? or when I try to delete the "L" (first possible point were the completion could have triggered)?

Reply by email

eoli
to Juha Manninen: On Wed, Oct 29, 2025 at 8:47?AM eoli via lazarus < Pipeline? You can push to your fork in…

I must upload my credit card info before I can use the pipeline on the gitlab and I can't do that.

patch is in the attachment. Thank you again.

On Wed, Oct 29, 2025 at 5:05?PM Juha Manninen via lazarus <

Show quoted text 24 lines
wrote: On Wed, Oct 29, 2025 at 8:47?AM eoli via lazarus < > wrote: > I?ve made a small improvement to SynEdit to make the completion behavior > smoother. > However, I?m currently unable to merge it because the pipeline cannot run > on my fork. > Could someone please help me resolve this? Thanks! > Pipeline? You can push to your fork in any case, can't you? You can also create a patch and send it here or upload to an issue report. Juha -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20251029/83f29535/attachment.htm> -------------- next part --------------
A non-text attachment was scrubbed...
Name: 6a43118655ed9d3849667d706ae422bce86c2883.patch Type: application/octet-stream
Size: 1008 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20251029/83f29535/attachment.obj>

Reply by email

eoli
to Martin Frb: You mean "to create a merge request"? I don't know which error you get, but you can…

Thank you, Martin, for your detailed thoughts and suggestions. I understand there are many historical behaviors involved. However, this change could make the editor feel more natural for new users who are used to modern editors. So I think it?s a good idea to provide an option and let users choose the behavior they prefer.

On Wed, Oct 29, 2025 at 5:20?PM Martin Frb via lazarus <

Show quoted text 81 lines
wrote: On 29/10/2025 07:47, eoli via lazarus wrote: > Hello everyone? > > I?ve made a small improvement to SynEdit to make the completion > behavior smoother. > However, I?m currently unable to merge it You mean "to create a merge request"? > because the pipeline cannot run on my fork. > Could someone please help me resolve this? Thanks! I don't know which error you get, but you can supply it as a patch. Also, you should be able to create a Merge request, even if the pipeline fails. We can still pull the request's branch and merge it locally. > > When completion popup is active and CurrentString is empty, > pressing Backspace now both deletes the trigger character (e.g. '.') > and closes the completion box. Nice. Probably that should be an option. Otherwise users will have their workflow disturbed, if the are used to hold backspace (keep pressed for longer) to delete the entire "prefix" (CurrentString) to start another prefix. E.g. if one is not sure what prefix the completion start with (or what it contains), and one wants to try a few word-fragments. Then if "Form1.maybe " does not list the expected completion, hold backspace till back at the dot, and try "Form1.perhaps". ------------------- How is it expected to behave if you have completion always enabled: "Automatically invoke on typing" ? (maybe with "only if word is longer or equal than" = 3 ? Either way will be ok. And I have no preference. (i.e. NO option needed for the below choices) 1) So if I have a variable MyLongNameValue and I type If MyL then the completion pops up, after I press "L". Then I type (with the completion open "o", so I have if MyLo If I use backspace now, should the completion box close when I am about to delete the "L"? Or should I be able to go back to M, and it close when I try to delete the SPACE in front of the M? 2) Also, if "at the M" then is that the point configured in "only if longer", or the point where the pop up opens. Because, if the completion still is set to a small delay, then I could (fast enough) type if MyLon and the completion would only open when I briefly pause after the "n", then would the backspace close the completion when I try to delete the "n"? or when I try to delete the "L" (first possible point were the completion could have triggered)? -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20251029/63ed8bdb/attachment-0001.htm>

Reply by email

Martin Frb
to eoli: I must upload my credit card info before I can use the pipeline on the gitlab and I can't…
eoli wrote
I must upload my credit card info before I can use the pipeline on the gitlab and I can't do that. patch is in the attachment. Thank you again.

Thanks I will have a look at the patch. / See my other mail.

About Gitlab.
You should be able to push, even if the pipeline fails. That is why I asked what error you get.

Afaik Most people who create merge requests have free account without credit card.? My own account does not have a credit card.

Reply by email

Martin Frb
to eoli: Thank you, Martin, for your detailed thoughts and suggestions. I understand there are…
eoli wrote 5 lines
Thank you, Martin, for your detailed thoughts and suggestions. I understand there are many historical behaviors involved. However, this change could make the editor feel more natural for new users who are used to modern editors. So I think it?s a good idea to provide an option and let users choose the behavior they prefer.

As I said "nice" => or "good feature"

But definitely need the option.

I can add that, but I don't currently know, when I would get to that.

------

The rest of my questions, is more out of interest: Has it been tested for those scenarios. And is the behaviour for them as **you** would expect?

Because you talk about the "dot" (or trigger char) that invoked it. But there may not be a dot. And the trigger could be anywhere **within** a word.

The trigger might be
- a brief pause while typing (in the middle of a word)
- typing the 3rd (or nth) char of a word (with no pause needed)

Of course, in that case it can be defined "word bound" instead of trigger.

If "word bound" then does it work (has it been tested) for when that is at the very start of a line? "Pos 1", not even a space in front of it. The backspace will delete the line break?
Or there even wont be anything to delete, if at line 1, pos 1.

All that needs testing.

Reply by email

eoli
to Martin Frb

I will do that all when I get free time, but I can't do that recently, sorry.

It just works for me on a Macbook

On Wed, Oct 29, 2025, 17:42 Martin Frb via lazarus <

Show quoted text 42 lines
wrote: On 29/10/2025 10:33, eoli via lazarus wrote: > Thank you, Martin, for your detailed thoughts and suggestions. > I understand there are many historical behaviors involved. > However, this change could make the editor feel more natural for new > users who are used to modern editors. So I think it?s a good idea to > provide an option and let users choose the behavior they prefer. As I said "nice" => or "good feature" But definitely need the option. I can add that, but I don't currently know, when I would get to that. ------ The rest of my questions, is more out of interest: Has it been tested for those scenarios. And is the behaviour for them as **you** would expect? Because you talk about the "dot" (or trigger char) that invoked it. But there may not be a dot. And the trigger could be anywhere **within** a word. The trigger might be - a brief pause while typing (in the middle of a word) - typing the 3rd (or nth) char of a word (with no pause needed) Of course, in that case it can be defined "word bound" instead of trigger. If "word bound" then does it work (has it been tested) for when that is at the very start of a line? "Pos 1", not even a space in front of it. The backspace will delete the line break? Or there even wont be anything to delete, if at line 1, pos 1. All that needs testing. -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20251029/6b214a50/attachment.htm>

Reply by email

n7800
to eoli

For information, MR is open at:? https://gitlab.com/freepascal.org/lazarus/lazarus/-/merge_requests/581 ?

Show quoted text 40 lines
?????, 29 ??????? 2025, 15:31 +05:00 ?? eoli via lazarus < >: ? I will do that all when I get free time, but I can't do that recently, sorry. ? It just works for me on a Macbook ? On Wed, Oct 29, 2025, 17:42 Martin Frb via lazarus < > wrote: >On 29/10/2025 10:33, eoli via lazarus wrote: >> Thank you, Martin, for your detailed thoughts and suggestions. >> I understand there are many historical behaviors involved. >> However, this change could make the editor feel more natural for new >> users who are used to modern editors. So I think it?s a good idea to >> provide an option and let users choose the behavior they prefer. > >As I said "nice" => or "good feature" > >But definitely need the option. > >I can add that, but I don't currently know, when I would get to that. > >------ > >The rest of my questions, is more out of interest: Has it been tested >for those scenarios. And is the behaviour for them as **you** would expect? > >Because you talk about the "dot" (or trigger char) that invoked it. But >there may not be a dot. And the trigger could be anywhere **within** a >word. > >The trigger might be >- a brief pause while typing (in the middle of a word) >- typing the 3rd (or nth) char of a word (with no pause needed) > >Of course, in that case it can be defined "word bound" instead of trigger. > >If "word bound" then does it work (has it been tested) for when that is >at the very start of a line? "Pos 1", not even a space in front of it. >The backspace will delete the line break? >Or there even wont be anything to delete, if at line 1, pos 1. > >All that needs testing.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20251029/f0b19853/attachment.htm>

Reply by email