Jan Hrastnik
3756c21bae
rebase on branch line_ending_detection
2021-06-16 17:00:21 +02:00
Gokul Soumya
d1c8a74771
Add theme key for selected line number
...
Adds `ui.linenr.selected` which controls highlight of linu numbes which
have cursors on.
- Fallback to linenr if linenr.selected is missing
- Update docs and themes
- Add TODOs for themes with temporary linenr.selected
2021-06-16 15:00:14 +09:00
Ivan Tham
124514aa70
Add cursor kind to separate hidden cursor from pos
...
Now IME cursor position should be correct since we can still set cursor
position without drawing the cursor.
2021-06-15 23:46:21 +08:00
Benoît CORTIER
6bdf609caa
Remove RwLock for registers
...
Registers are stored inside `Editor` and accessed without `RwLock`.
To work around ownership, I added a sister method to `Editor::current`:
`Editor::current_with_context`. I tried to modify `Editor::current`
directly but it's used at a lot of places so I reverted into this for
now at least.
2021-06-15 23:01:56 +08:00
Benoît CORTIER
6fb2d2679d
Use _impl
suffix instead of _
prefix
...
Helpers / internal implementations where using the `_` prefix.
However, this prefix also suppress unused warnings.
I suggest we use the `_impl` suffix instead.
2021-06-15 02:33:12 -04:00
Ivan Tham
002f1ad397
Add filter ability to picker
...
Inspired by doom emacs. Able to filter picker options multiple times.
2021-06-15 12:00:31 +08:00
Nathan Vegdahl
4faf1d3bf4
Remove indent style status-line display for now.
2021-06-14 18:32:23 -07:00
Nathan Vegdahl
358ea6a37c
Implement command to change the indent-style setting of a document.
2021-06-14 18:32:23 -07:00
Nathan Vegdahl
8648e483f7
Render indent-style status in status line.
...
Also cleaned up the status line code a little.
2021-06-14 18:32:23 -07:00
Ivan Tham
1bda454149
Add ctrl-w for prompt
2021-06-15 01:06:53 +09:00
Gokul Soumya
f33aaba53f
Add ui.selection to theme.toml
...
Enables changing the color of the selection which was previously
hard coded.
2021-06-15 00:06:53 +09:00
Blaž Hrastnik
d545e61644
ui: Prompt should figure out a reasonable column width
...
Fixes #192
Refs #225
2021-06-13 22:28:18 +09:00
Wojciech Kępka
d8b5d1181f
Add Copy
derive to PromptEvent
2021-06-13 20:48:18 +09:00
Wojciech Kępka
b500a2a138
commands: Add more write commands
2021-06-13 20:48:18 +09:00
Ivan Tham
1953588873
Change picker horizontal split to h
...
Follow window mode and vim behavior, x seemed weird.
2021-06-12 21:17:48 +09:00
wojciechkepka
4dbc23ff1c
Fix documentation popup panic
2021-06-10 11:26:03 +09:00
Kevin Sjöberg
b20e4a108c
Only enforce limit outside of .git
2021-06-09 10:06:31 +09:00
Kevin Sjöberg
1bb9977faf
Match keybindings of menu
2021-06-09 09:54:22 +09:00
Kevin Sjöberg
29962a5bd9
Fix Shift-Tab for moving upwards in menu
2021-06-09 09:53:40 +09:00
Blaž Hrastnik
83723957fe
Fix crash when too many completions available
...
Refs #81
2021-06-08 21:58:26 +09:00
Zheming Li
ae51065213
Support go to line 1
2021-06-08 17:27:21 +09:00
Wojciech Kępka
1bffb34350
Make matching bracket dimmed, prevent out of bounds rendering
2021-06-08 17:23:05 +09:00
Kevin Sjöberg
08f50310bd
Bump file picker limit
2021-06-08 09:51:50 +09:00
Wojciech Kępka
6fc0e0b5fb
completion: Fix unimplemented autocomplete
2021-06-08 09:38:53 +09:00
Blaž Hrastnik
3cee0bf200
Address clippy lint
2021-06-07 23:08:51 +09:00
Benoît CORTIER
68affa3c59
Implement register selection
...
User can select register to yank into with the " command.
A new state is added to `Editor` and `commands::Context` structs.
This state is managed by leveraging a new struct `RegisterSelection`.
2021-06-07 21:52:09 +09:00
Blaž Hrastnik
14830e75ff
Revert the line number rendering change, we were correct before
2021-06-07 13:24:03 +09:00
ahkrr
e2d780f993
fix: 2 panics while setting style + off by 1
...
The panics would occur because set_style
would draw outside of the the surface.
Both occured using `find_prev` or `till_prev`
In my case the first panic! would appear
in a terminal with around 80 columns
in helix/README.md going to the end of the file
with `geglf(`
the second with `geglfX`
The off by one fix ensures that `find_nth_prev`
starts at the first character to the left
2021-06-07 09:15:08 +09:00
Wojciech Kępka
16b1cfa3be
Add diagnostics keybindings
2021-06-07 09:11:52 +09:00
Kevin Sjöberg
3494bb8ef0
Refactor index assignment
...
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2021-06-06 21:48:19 +09:00
Kevin Sjöberg
a4ff8cdd8a
Allow moving backwards in completions
2021-06-06 21:48:19 +09:00
Kevin Sjöberg
145bc1970a
Trigger directory completion upon pressing Enter
2021-06-06 21:48:19 +09:00
Kevin Sjöberg
aa8a8baeeb
Calculate offset when moving picker cursor
2021-06-06 19:18:09 +09:00
Kevin Sjöberg
2ac496f919
Do not move past number of matches
2021-06-06 18:04:45 +09:00
ahkrr
c5c3ec07f4
fix: panicked at 'attempt to subtract with overflow'
...
helix-term/src/ui/editor.rs:275:29
This would happen when the window-size was to small to display the entire width and one would start jumping forwards with f<some_char> and the beginning of the highlighted area would end up outside of the window
2021-06-06 00:01:16 +09:00
Kirawi
c17dcb8633
Fixing Multiple Panics ( #121 )
...
* init
* wip
* wip
2021-06-05 12:49:19 +09:00
Blaž Hrastnik
f2e554d761
matchbrackets: Needs to render with the viewport offset
2021-06-04 15:11:55 +09:00
Ivan Tham
29b9eed33c
Fix panic paint mysterious matching pair
...
When the matching pair is out of bounds it still paints it causing an
out of bound panic. A dirty fix since it still have some issue, at least
it does not panic now.
2021-06-04 09:25:03 +09:00
Jan Hrastnik
c1c3750d38
key is now modified in place at start of handle_event
2021-06-03 23:16:04 +09:00
Jan Hrastnik
daad8ebe12
key_canonicalization now only matches chars
2021-06-03 23:16:04 +09:00
Jan Hrastnik
68abc67ec6
put the key canonicalization in a seperate function. only chars now get stripped of Shift modifier
2021-06-03 23:16:04 +09:00
Jan Hrastnik
712f25c2b9
removed shift matching
2021-06-03 23:16:04 +09:00
notoria
c3a98b6a3e
Highlight matching brackets
2021-06-03 11:40:46 +02:00
Blaž Hrastnik
661dbdca57
Fix cursor not showing on (0, 0)
2021-06-03 13:34:00 +09:00
Blaž Hrastnik
c0332bd935
Fix split sizes getting out of sync with the terminal size, refs #69
2021-06-03 10:28:49 +09:00
Blaž Hrastnik
a2147fc7d5
Change help prompt styling
2021-06-01 12:00:25 +09:00
Blaž Hrastnik
87d0617f3b
Completion: Format docs tabs & highlight in the doc's native language
2021-05-30 17:13:02 +09:00
Blaž Hrastnik
3810650a6b
Completion: Render non-markdown docs too
2021-05-30 10:36:58 +09:00
Blaž Hrastnik
d54ae09d3b
ESC should exit both completion and insert mode
2021-05-29 10:37:47 +09:00
Blaž Hrastnik
d708efe275
Fix cursor positioning for prompts
2021-05-29 00:06:23 +09:00