From 241ddd9cea50567f79eb8fd0fb1418f7cf2b1974 Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Wed, 7 Jul 2021 13:46:16 +0200 Subject: [PATCH] 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 --- TODO | 4 ++++ data/core/commands/doc.lua | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index 25cc423..b160f4e 100644 --- a/TODO +++ b/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 diff --git a/data/core/commands/doc.lua b/data/core/commands/doc.lua index 0687a18..33fb886 100644 --- a/data/core/commands/doc.lua +++ b/data/core/commands/doc.lua @@ -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)