editor: Add support for drag_and_drop_selection
(#30671)
Closes #4958 Release Notes: - Added support for drag and drop text selection. It can be disabled by setting `drag_and_drop_selection` to `false`. --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
This commit is contained in:
parent
b15aef4310
commit
4fe05530b0
6 changed files with 214 additions and 16 deletions
|
@ -915,6 +915,9 @@ impl Vim {
|
|||
if mode == Mode::Normal || mode != last_mode {
|
||||
self.current_tx.take();
|
||||
self.current_anchor.take();
|
||||
self.update_editor(window, cx, |_, editor, window, cx| {
|
||||
editor.drop_selection(None, false, window, cx);
|
||||
});
|
||||
}
|
||||
Vim::take_forced_motion(cx);
|
||||
if mode != Mode::Insert && mode != Mode::Replace {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue