Commit Graph

18 Commits (4eca4b3079bf53de874959270d0b3471d320debc)

Author SHA1 Message Date
Matthew Toohey 6a3f7f2c39
feat: make `move_vertically` aware of tabs and wide characters (#2620)
* feat: make `move_vertically` aware of tabs and wide characters

* refactor: replace unnecessary checked_sub with comparison

* refactor: leave pos_at_coords unchanged and introduce separate pos_at_visual_coords

* style: include comment to explain `pos_at_visual_coords` breaking condition

* refactor: use `pos_at_visual_coords` in `text_pos_at_screen_coords`

* feat: make `copy_selection_on_line` aware of wide characters
2022-06-22 01:36:36 +09:00
Blaž Hrastnik fd02d1bf89
Fix tab rendering to use dynamic tab width
Each tab is just wide enough to round to the nearest tab stop.

Refs #1243
2022-03-04 11:01:33 +09:00
Blaž Hrastnik 5d14f56fa9
Reuse visual_coords_at_pos function in view 2022-03-04 09:36:31 +09:00
Ivan Tham 759b850859
Allow specifying file start position (#445)
Like helix-term/src/commands.rs:3426:15
2022-01-23 16:54:03 +09:00
Ivan Tham 3eb829e233
Ensure coords in screen depends on char width (#885)
The issue affected files with lots of tabs at the start as well.

Fix #840
2021-11-03 12:02:29 +09:00
Nathan Vegdahl b5223618ed Document `pos_at_coords` better.
Particularly the effect of the `limit_before_line_ending`
parameter.
2021-08-09 11:12:38 +09:00
Nathan Vegdahl fd684ef693 Revert display-width-based vertical cursor movement.
Still needs to be done, but should be part of a separate PR.
2021-07-22 13:21:44 -07:00
Nathan Vegdahl c848ed7abc Fixes for misc bugs with view movement. 2021-07-20 18:15:34 -07:00
Nathan Vegdahl 6e15c9b874 Make vertical selection movement work properly. 2021-07-05 18:58:33 -07:00
Nathan Vegdahl 220bc85821 Fix all remaining warnings in helix-core except for two.
I'm not sure how to address them, because they look like they
might be bugs, and code is involved.  Will poke the relevant people.
2021-07-01 19:06:52 -07:00
Nathan Vegdahl b571f28641 Remove #[allow(unused)] from helix-core, and fix unused imports.
Still a bunch more warnings to fix in core, but it's a start.
2021-07-01 19:06:52 -07:00
Nathan Vegdahl 4efd6713c5 Work on moving code over to LineEnding instead of assuming '\n'.
Also some general cleanup and some minor fixes along the way.
2021-06-20 15:33:02 -07:00
Blaž Hrastnik 06aca7691c clippy lint 2021-03-24 14:58:01 +09:00
Blaž Hrastnik dbcc099f48 Move things out of state.rs. 2021-03-18 14:07:53 +09:00
Blaž Hrastnik 7c99ff58fd nix: include rust-src so rust-analyzer works correctly. 2021-01-19 16:16:15 +09:00
Blaž Hrastnik 088f8a82af Incremental parsing: rough draft. 2020-09-17 16:32:40 +09:00
Blaž Hrastnik 44ff4d3c1f Implement a new core based on CodeMirror. 2020-05-25 13:02:21 +09:00
Blaž Hrastnik 240e5f4e3d Initial import. 2020-05-20 18:14:51 +09:00