ple
ple copied to clipboard
Allow to cancel quitting with ^X.
- Fix undo of multiline insertion. (From #5)
- Allow to cancel quitting with ^X.
When quitting is blocked by unsaved files, allows to abort the quit by a starting a ^X key sequence, without first dismissing the "Quit?" question. The primary expected use is for the user to do ^X-^S, ^X-^C when realizing that their buffer wasn't saved.
(Typing a 'n' or hitting return or enter before the ^X-^S may seem like a small step, but my own experience is that I forget and want to go straight to ^X-^s.)
Hmm... I understand the rationale. This is smart, but I am not sure I am comfortable with it. Will mull it over :)
That's fair. You could also have a look at https://github.com/philanc/ple/compare/master...bjornbm:ple:initsep to see if anything there is of interest.
Some of it is just cleaning up minor things luacheck complains about, but you may not be interest/agree with luacheck. And some other you may find gratuitous or unnecessary (for example 9790a2c6b0a219c432c3199ba780407785a6399c and ecf528f8902b60e6f8468eda3770a96e6a035951).
If anything is of interest, feel free to pull, or ask me to prepare a cleaner pull request if you want only some of (right now the commit from #8 is in the branch).
I had a look at your 'initsep' branch.
"Show number of unsaved buffers on quit." - I like it -- should have done it that way in the first place :)
"Avoid shadowing variables (luacheck)" - This is good / cleaner.
"Remove trailing whitespace (luacheck)" - don't care much about it :) Now if I start using Luacheck, I will be happy to remove them, at least to silence these warnings :)
"Make editor a local variable / Make all remaining globals local" - This is good. Now, I must review my extensions (code loaded in ple_init.lua). Along the years, I have directly used at some point some editor globals in extension code. Mostly before using 'editor' as the extension API.