Commit Graph

5627 Commits (append-changes-ensure-cursor-automatically)

Author SHA1 Message Date
Nathan Vegdahl 2dba228c76 Fix highlight code splitting graphemes.
This resulted in phantom blank lines in files with CRLF line
endings, but could potentially have manifested with other
graphemes as well.
2021-06-26 11:09:50 +09:00
Wojciech Kępka eb6fb63e74
Sort files in file picker by access, modification and creation date (#336)
* Sort files in file picker by access date

* Fallback file time to modified then created then UNIX_EPOCH

* Use `sort_by_key`

* Refactor
2021-06-26 11:09:17 +09:00
Nathan Vegdahl d534d6470f Detect file language before file indent style.
Fixes #378.  The issue was that because indent style detection
ran before language detection, there was no language indent
style to fall back on if indent style detection failed, so it
would just default to 2 spaces.
2021-06-25 20:27:43 -04:00
Gokul Soumya e8d2f3612f Use unicode_width to correctly truncate picker chars 2021-06-25 16:09:05 -07:00
teenjuna c688288881
Move helix-view/tests/*txt files to txts subdirectory (#372)
* Move helix-view/tests/*txt files to txts subdirectory

* Rename tests/txts to tests/encoding
2021-06-25 15:59:06 +09:00
Blaž Hrastnik f2d8ce3415 Use a deadline when eagerly processing notifications 2021-06-25 13:22:50 +09:00
Blaž Hrastnik 503ca112ae fix: jumping to location did not convert the URI correctly
thus breaking Windows
2021-06-25 13:20:15 +09:00
Blaž Hrastnik 8e277ad8ba fix: crossterm -> input key conversion 2021-06-25 13:13:15 +09:00
Keith Simmons 4418e17547
reverse the dependency between helix-tui and helix-view (#366)
* reverse the dependency between helix-tui and helix-view by moving a fiew types to view

* fix tests

* clippy and format fixes

Co-authored-by: Keith Simmons <keithsim@microsoft.com>
2021-06-25 12:58:15 +09:00
Ivan Tham 74cc4b4a49
Add default color for cursor match (#370)
* Add default color for cursor match

Not all terminals support dim, for those terminal that does not support
this (konsole, item2, wezterm), users cannot differentiate between match
and primary cursor. So set a color for this.

* Use alacritty dim color for match
2021-06-25 11:18:38 +09:00
Ivan Tham c2b937481f Fix goto line end
Should not goto newline.
2021-06-24 18:34:23 -07:00
Gokul Soumya 18beda38ac Add … when chars are truncated in picker 2021-06-25 09:28:24 +09:00
Ivan Tham 10548bf0e3 Fix previous broken refactor key into helix-view
Need to be used for autoinfo

Revert "Revert "Refactor key into helix-view""

This reverts commit 10f9f72232.
2021-06-25 00:39:03 +09:00
Kirawi 15ae2e7ef1 Update helix-term/src/commands.rs
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2021-06-24 22:38:38 +09:00
Kirawi 7ae21b98ce Update helix-term/src/commands.rs
Co-authored-by: Ivan Tham <pickfire@riseup.net>
2021-06-24 22:38:38 +09:00
Shafkath Shuhan 629df6124d Blocking :wq 2021-06-24 22:38:38 +09:00
Nathan Vegdahl 8935e7a879 Fix open-new-line command for CRLF, as well as other bugs.
Fixes #363.

I set out to fix issue #363, but after fixing it discovered some
other things were wrong with the command while testing.  In
summary:
- #363 was because it was still assuming a line ending width
  of 1 char in its indexing calculations, even when actually
  inserting CRLF.
- Aside from #363, it actually needed to set `line_end_index`
  to zero for *all* calculations that use it when line == 0,
  but it was only doing so for a single calculation.
2021-06-24 18:25:56 +09:00
Gokul Soumya 394629ab73 Skip enclosed pairs in surround
Surround operations previously ignored other pairs that are
enclosed within which should be skipped. For example if the
cursor is on the `,` in `{{a},{b}}`, doing `md{` previously
would delete the `{` on the left of `a` and `}` on the right
of `b` instead of the outermost braces. This commit corrects
this behavior.
2021-06-24 13:02:56 +09:00
Gokul Soumya fb8e7dc25b Fix picker item width overflow
Fixes #352
2021-06-24 12:00:08 +09:00
Alex Ryapolov 2924522aea Remove duplicate properties from theme.toml 2021-06-24 09:23:23 +08:00
Benoît CORTIER 14f61fb6ac Fix lsp config deserialization case
It should have been in kebab-case, but it was the default snake_case.
2021-06-24 10:04:18 +09:00
Nathan Vegdahl 9cbf564d08 Handle erroneously ignored case in RopeGraphemes iterator. 2021-06-24 10:04:03 +09:00
Blaž Hrastnik 7f6265ecf3 fix: crash with ctrl-c on empty file 2021-06-24 01:38:02 +09:00
Blaž Hrastnik 0f55e67576 fix: ok, needs to be the end of the previous line 2021-06-24 01:35:36 +09:00
Blaž Hrastnik 7366fe81e0 open: Use the correct function
Still not correct but at least it doesn't append at EOF
2021-06-24 01:06:17 +09:00
Blaž Hrastnik 4ad7b61c69 fix: Better fix that also fixes crashes on `o` 2021-06-24 00:58:14 +09:00
Blaž Hrastnik 655c1aeb73 fix: panic on O at the start of the file (fixes #354) 2021-06-24 00:50:52 +09:00
Blaž Hrastnik ea8cd4765d Adjust default theme colors (insert/extend cursor) 2021-06-23 22:11:46 +09:00
Blaž Hrastnik 39dc09e6c4 ui: Paginate prompt completion 2021-06-23 21:55:13 +09:00
wojciechkepka 3606d8bd24 Patch the primary cursor with insert and select styles 2021-06-23 21:55:02 +09:00
wojciechkepka c534fdefdc Refactor, add `ui.cursor.primary` 2021-06-23 21:55:02 +09:00
wojciechkepka d70be55f70 Add ability to theme primary selecition 2021-06-23 21:55:02 +09:00
wojciechkepka ac1e98d088 Add ability to theme cursor 2021-06-23 21:55:02 +09:00
wojciechkepka f09ccbc891 Update docs 2021-06-23 21:55:02 +09:00
wojciechkepka ed6528b9a6 fix: Docs, `select_line` -> `extend_line` 2021-06-23 16:23:15 +09:00
Shafkath Shuhan 6564257a7b add missing doc 2021-06-23 15:40:27 +09:00
nobody 7896eefd73 add tests 2021-06-23 15:40:27 +09:00
Shafkath Shuhan fd98e743e8 Handle non-UTF8 files 2021-06-23 15:40:27 +09:00
Blaž Hrastnik 9706f1121d Fix small screen panics 2021-06-23 13:13:56 +09:00
Nathan Vegdahl 2ff9b362fb Update to Ropey v1.3.1 with needed bugfix. 2021-06-23 12:43:09 +09:00
Nathan Vegdahl 848cc1b438 Fix extend_line() behavior.
It would always extend to the next line if the cursor was at the
end of the current line, even if the current line wasn't fully
selected yet.
2021-06-23 12:43:09 +09:00
Nathan Vegdahl 481c4ba044 Increment char_index by grapheme char count.
It was just assuming single-char graphemes before.
2021-06-23 12:43:09 +09:00
Nathan Vegdahl 0cbaa998ce Fix flipped condition where Helix adds a line ending on open. 2021-06-23 12:43:09 +09:00
Nathan Vegdahl 38bf9c2576 Missed some items in the CRLF PR. 2021-06-23 12:43:09 +09:00
Blaž Hrastnik 9c53461429 fix: Select matching at the start of the doc could crash. Fixes #346 2021-06-23 12:27:38 +09:00
Blaž Hrastnik 7511110d82 Fix build on master 2021-06-23 10:15:57 +09:00
Joe Neeman fd1ae35051 Make the prompt callback take a Context. 2021-06-23 10:03:11 +09:00
Lionel Flandrin 16883e7543 Implement show_current_directory command 2021-06-22 19:20:51 -04:00
Lionel Flandrin b56174d738 Implement change_current_directory command 2021-06-22 19:20:51 -04:00
Blaž Hrastnik 866b32b5d7 Add repology.org packaging status 2021-06-23 01:05:22 +09:00