fix deleting indentation when there wasn't any
before pressing backspace when there were config.indent_size many spaces right before the caret would delete them regardless of config.indent_type being "hard" or not
This commit is contained in:
parent
a5e90420e8
commit
241ddd9cea
4
TODO
4
TODO
@ -15,6 +15,10 @@
|
||||
[x] add menu to exec arbitrary command -> added console
|
||||
[ ] that command can be what is selected
|
||||
[ ] console: accept input
|
||||
[ ] console: add option to open terminal
|
||||
[ ] console: make the itegrated console v100 compatible
|
||||
[ ] console: automatically switch focus to the previous rootview when hiding it
|
||||
or selecting something from a treeview
|
||||
[ ] doc: detect file changes with hash
|
||||
[x] add horizontal scroll
|
||||
[ ] add a cross to close tab
|
||||
|
@ -127,7 +127,7 @@ local commands = {
|
||||
|
||||
["doc:backspace"] = function()
|
||||
local line, col = doc():get_selection()
|
||||
if not doc():has_selection() then
|
||||
if not doc():has_selection() and config.tab_type ~= "hard" then
|
||||
local text = doc():get_text(line, 1, line, col)
|
||||
if #text >= config.indent_size and text:find("^ *$") then
|
||||
doc():delete_to(0, -config.indent_size)
|
||||
|
Loading…
Reference in New Issue
Block a user