diff options
author | jgmdev <jgmdev@gmail.com> | 2021-06-11 17:35:46 -0400 |
---|---|---|
committer | jgmdev <jgmdev@gmail.com> | 2021-06-11 17:35:46 -0400 |
commit | 69547591d228a00140889df0b7fccda6e597c8d0 (patch) | |
tree | 9069f8a08d9b23fa0da2159add4d7d9039727c0c /plugins/selectionhighlight.lua | |
parent | bb58f7b973bc6aabfdaabfd536beb7644a364d34 (diff) | |
download | lite-xl-plugins-69547591d228a00140889df0b7fccda6e597c8d0.tar.gz lite-xl-plugins-69547591d228a00140889df0b7fccda6e597c8d0.zip |
Removed configuration to enable selecting empty spaces.
Diffstat (limited to 'plugins/selectionhighlight.lua')
-rw-r--r-- | plugins/selectionhighlight.lua | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/plugins/selectionhighlight.lua b/plugins/selectionhighlight.lua index 132e6aa..93ac0fb 100644 --- a/plugins/selectionhighlight.lua +++ b/plugins/selectionhighlight.lua @@ -5,9 +5,6 @@ local config = require "core.config" -- originally written by luveti --- Set to true to also highlight empty spaces -config.highlight_spaces = false - local function draw_box(x, y, w, h, color) local r = renderer.draw_rect local s = math.ceil(SCALE) @@ -23,15 +20,7 @@ local draw_line_body = DocView.draw_line_body function DocView:draw_line_body(idx, x, y) local line1, col1, line2, col2 = self.doc:get_selection(true) local selection = self.doc:get_text(line1, col1, line2, col2) - if - line1 == line2 and col1 ~= col2 - and - ( - config.highlight_spaces - or - not selection:match("^%s+$") - ) - then + if line1 == line2 and col1 ~= col2 and not selection:match("^%s+$") then local lh = self:get_line_height() local selected_text = self.doc.lines[line1]:sub(col1, col2 - 1) local current_line_text = self.doc.lines[idx] |