Commit Graph

19 Commits

Author SHA1 Message Date
sammyette 06cb09cb93 feat: add option to only draw whitespace if it is within selection (#1312)
* refactor: remove sort_positions usage
* refactor: move draw conditional to has_any_selection and other changes
  - snake case (sssss)
  - break after finding selection
* fix: typo of config plugins
* fix: do check for show selected only properly
* feat: only draw within selection per substitution
* `drawwhitespace`: Make `show_selected_only` work properly

---------

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
2023-08-07 15:02:06 +01:00
Guldoman 8a9bac7de3
Fix `drawwhitespace` drawing lines with different substitution kinds
When multiple substitution kinds are present in the same line, they're 
placed in the cache in an order that's spatially consistent only between 
items of the same kind.
Because we stopped drawing after we reached the first invisible 
substitution, the subsequent kinds weren't drawn even if they should 
have been.
2022-10-30 02:54:30 +01:00
jgmdev 261292c6aa plugin drawwhitespace: allow newline substitution 2022-10-21 13:53:42 -04:00
Guldoman d7f9b30d05
`drawwhitespace`: Invalidate cache on indent size change 2022-07-15 06:54:03 +02:00
Guldoman 438ed6984a
`drawwhitespace`: Invalidate cache on font size change 2022-06-25 03:30:33 +02:00
Guldoman 76c1db97f5
`drawwhitespace`: Use `Docview` vertical line offset 2022-06-20 19:56:53 +02:00
Guldoman 2d3abd2533
`drawwhitespace`: Invalidate cache on config changes 2022-06-16 00:03:25 +02:00
Guldoman f38723ea46
`drawwhitespace`: Cache whitespace location 2022-06-11 06:30:13 +02:00
jgmdev 5da7467a5c plugin drawwhitespace: return line height on draw_line_text 2022-06-03 03:16:18 -04:00
jgmdev 4157dd867c plugin drawwhitespace: added config spec 2022-06-02 00:07:34 -04:00
Jefferson González 59a5839ac9
Merge pull request #908 from Guldoman/PR_improve_whitespace
Improve `drawwhitespace` plugin
2022-06-01 21:59:45 -04:00
jgmdev 2d8a15f3ab plugins: dropped --lite-xl version tag 2022-05-31 16:34:14 -04:00
Guldoman 93b31211cb
Apply `drawwhitespace` plugin only to `DocView`s 2022-04-12 04:05:59 +02:00
Adam Harrison 45a0382d50 Bumping version numbers. 2022-04-03 16:44:02 -04:00
Guldoman c70b5130a9
Improve `drawwhitespace` plugin
Add configuration options to specify:
- characters to substitute and their substitution;
- whether to substitute at the beginning, middle or end of the line;
- the color of the substitution;
- the color for the beginning, middle or end;
- the minimum number of white space to show in the middle.
2022-04-01 18:18:50 +02:00
Adam Harrison 3162f4ea4f Added in the ability to specify a color for whitespace. 2021-11-23 18:42:01 -05:00
Guldoman 6a7a02542f
Draw only visible whitespaces 2021-11-17 02:57:14 +01:00
Adam Harrison 425a4f600b Forgot to reset offset. 2021-09-24 11:22:39 -04:00
Adam Harrison e25f2e9c5c Removed font renderer. 2021-09-24 11:22:39 -04:00