mirror of
https://github.com/tmux/tmux.git
synced 2025-12-26 19:56:03 +00:00
Add selection_mode format variable for copy mode, from Mike Jonkmans in
GitHub issue 4773.
This commit is contained in:
1
tmux.1
1
tmux.1
@@ -6238,6 +6238,7 @@ The following variables are available, where appropriate:
|
|||||||
.It Li "selection_active" Ta "" Ta "1 if selection started and changes with the cursor in copy mode"
|
.It Li "selection_active" Ta "" Ta "1 if selection started and changes with the cursor in copy mode"
|
||||||
.It Li "selection_end_x" Ta "" Ta "X position of the end of the selection"
|
.It Li "selection_end_x" Ta "" Ta "X position of the end of the selection"
|
||||||
.It Li "selection_end_y" Ta "" Ta "Y position of the end of the selection"
|
.It Li "selection_end_y" Ta "" Ta "Y position of the end of the selection"
|
||||||
|
.It Li "selection_mode" Ta "" Ta "Selection mode"
|
||||||
.It Li "selection_present" Ta "" Ta "1 if selection started in copy mode"
|
.It Li "selection_present" Ta "" Ta "1 if selection started in copy mode"
|
||||||
.It Li "selection_start_x" Ta "" Ta "X position of the start of the selection"
|
.It Li "selection_start_x" Ta "" Ta "X position of the start of the selection"
|
||||||
.It Li "selection_start_y" Ta "" Ta "Y position of the start of the selection"
|
.It Li "selection_start_y" Ta "" Ta "Y position of the start of the selection"
|
||||||
|
|||||||
@@ -956,6 +956,18 @@ window_copy_formats(struct window_mode_entry *wme, struct format_tree *ft)
|
|||||||
format_add(ft, "selection_present", "0");
|
format_add(ft, "selection_present", "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (data->selflag) {
|
||||||
|
case SEL_CHAR:
|
||||||
|
format_add(ft, "selection_mode", "char");
|
||||||
|
break;
|
||||||
|
case SEL_WORD:
|
||||||
|
format_add(ft, "selection_mode", "word");
|
||||||
|
break;
|
||||||
|
case SEL_LINE:
|
||||||
|
format_add(ft, "selection_mode", "line");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
format_add(ft, "search_present", "%d", data->searchmark != NULL);
|
format_add(ft, "search_present", "%d", data->searchmark != NULL);
|
||||||
format_add(ft, "search_timed_out", "%d", data->timeout);
|
format_add(ft, "search_timed_out", "%d", data->timeout);
|
||||||
if (data->searchcount != -1) {
|
if (data->searchcount != -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user