Enable copy and paste in vim mode
This commit is contained in:
parent
d094d1d891
commit
082036161f
10 changed files with 183 additions and 34 deletions
|
|
@ -6,6 +6,7 @@ mod insert;
|
|||
mod motion;
|
||||
mod normal;
|
||||
mod state;
|
||||
mod utils;
|
||||
mod visual;
|
||||
|
||||
use collections::HashMap;
|
||||
|
|
@ -140,11 +141,14 @@ impl Vim {
|
|||
}
|
||||
|
||||
if state.empty_selections_only() {
|
||||
editor.change_selections(None, cx, |s| {
|
||||
s.move_with(|_, selection| {
|
||||
selection.collapse_to(selection.head(), selection.goal)
|
||||
});
|
||||
})
|
||||
// Defer so that access to global settings object doesn't panic
|
||||
cx.defer(|editor, cx| {
|
||||
editor.change_selections(None, cx, |s| {
|
||||
s.move_with(|_, selection| {
|
||||
selection.collapse_to(selection.head(), selection.goal)
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue