Add clip_to_line_end to display_map/snapshot and set it to ensure vim positioning in normal mode
Co-authored-by: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
bb9b36dccd
commit
0aaf270650
10 changed files with 142 additions and 104 deletions
|
@ -1071,6 +1071,11 @@ impl Editor {
|
|||
cx.notify();
|
||||
}
|
||||
|
||||
pub fn set_clip_at_line_ends(&mut self, clip: bool, cx: &mut ViewContext<Self>) {
|
||||
self.display_map
|
||||
.update(cx, |map, _| map.clip_at_line_ends = clip);
|
||||
}
|
||||
|
||||
pub fn set_keymap_context_layer<Tag: 'static>(&mut self, context: gpui::keymap::Context) {
|
||||
self.keymap_context_layers
|
||||
.insert(TypeId::of::<Tag>(), context);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue