mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 17:27:39 +02:00
Add word-and-line-from-point feature to possible mouse selection actions.
This commit is contained in:
@@ -722,6 +722,11 @@ mma('Select line from point',
|
||||
long_text='Select from the clicked point to the end of the line.'
|
||||
)
|
||||
|
||||
mma('Select a word at the point, together with the rest of the line',
|
||||
'select_word_and_line_from_point ctrl+alt+left triplepress ungrabbed mouse_selection word_and_line_from_point',
|
||||
long_text='Select the word under the clicked point, as well as through the end of the line.'
|
||||
)
|
||||
|
||||
mma('Extend the current selection',
|
||||
'extend_selection right press ungrabbed mouse_selection extend',
|
||||
long_text='''
|
||||
@@ -759,6 +764,11 @@ mma('Select line from point even when grabbed',
|
||||
long_text='Select from the clicked point to the end of the line even when grabbed.'
|
||||
)
|
||||
|
||||
mma('Select line from point even when grabbed',
|
||||
'select_word_and_line_from_point_grabbed ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection word_and_line_from_point',
|
||||
long_text='Select the click word and to end of line, even when grabbed.'
|
||||
)
|
||||
|
||||
mma('Extend the current selection even when grabbed',
|
||||
'extend_selection_grabbed shift+right press ungrabbed,grabbed mouse_selection extend',
|
||||
)
|
||||
|
||||
@@ -388,6 +388,7 @@ def mouse_selection(func: str, rest: str) -> FuncArgsType:
|
||||
'word': defines.MOUSE_SELECTION_WORD,
|
||||
'line': defines.MOUSE_SELECTION_LINE,
|
||||
'line_from_point': defines.MOUSE_SELECTION_LINE_FROM_POINT,
|
||||
'word_and_line_from_point': defines.MOUSE_SELECTION_WORD_AND_LINE_FROM_POINT,
|
||||
}
|
||||
setattr(mouse_selection, 'code_map', cmap)
|
||||
return func, [cmap[rest]]
|
||||
|
||||
Reference in New Issue
Block a user