summaryrefslogtreecommitdiffstats
path: root/menu.c
AgeCommit message (Collapse)Author
2023-08-15Add an option menu-selected-style to configure the currently selectednicm
menu item, from Alexis Hildebrandt.
2023-08-08Add options and flags for menu styles similar to those existing fornicm
popups, from Alexis Hildebrandt. GitHub issue 3650.
2023-08-08Extend the menu drawing function to support custom characters andnicm
styles, from Alexis Hildebrandt.
2023-02-05Do not allow multiple line separators in a row.nicm
2023-01-20Add a flag to display-menu to select the manu item chosen first, GitHubnicm
issue 3442.
2022-08-04Change g and G to go to top and bottom of menu, GitHub issue 3286.nicm
2022-06-16Keep cursor on selected item on menu (useful for blind people), GitHubnicm
issue 3225.
2022-05-31Trim menu item text correctly, GitHub issue 3197.nicm
2022-02-16Support more mouse buttons when the terminal sends them, GitHub issuenicm
3055.
2022-02-01A menu must be shown on a client, so always give the client when addingnicm
the items. Also fix mode menus.
2022-02-01Do not overflow width when not enough space.nicm
2021-11-11If trimming menu item text, show key if it would take up less than anicm
quarter of the space; from Alexis Hildebrandt. Also new sentence, new line in tmux.1, from jmc.
2021-10-22Remove key and trim text if menu cannot fit in available space, based onnicm
a change from Alexis Hildebrandt.
2021-10-18Fix menu width containing disabled items, from Alexis Hildebrandt innicm
GitHub issue 2935.
2021-10-11Make positions hidden by overlays range-based rather than character-based,nicm
from Anindya Mukherjee.
2021-09-09Turn on both button and all mouse modes for menus since some terminalsnicm
only support the former.
2021-09-09Fix parsing of aliases again (GitHub issue 2842), also make argumentnicm
parsing a bit simpler and fix the names of some client flags.
2021-08-13Add a menu when a popup is present (mouse only for now).nicm
2021-07-21Do not close popups on resize, instead adjust them to fit, from Anindyanicm
Mukherjee.
2020-10-30Do not allow disabled items to be selected.nicm
2020-10-30Add a -O flag to display-menu to change the mouse behaviour and notnicm
close the menu when the mouse is released, from teo_paul1 at yahoo dot com.
2020-09-16Fix some warnings, GitHub issue 2382.nicm
2020-05-25Include title for the width of the menu.nicm
2020-05-16Separate key flags and modifiers, log key flags, make the "xterm" flagnicm
more explicit and fix M- keys with a leading escape.
2020-05-16Try to search the entire history first for up to 200 ms so a searchnicm
count can be shown. If it takes too long, search the visible text only.
2020-05-16Do not hoke into struct window_pane from the tty code and instead setnicm
everything up in tty_ctx. Provide a way to initialize the tty_ctx from a callback and use it to let popups draw directly through input_parse in the same way as panes do, rather than forcing a full redraw on every change.
2020-05-16Improve command prompt completion:nicm
- Show a menu with completions if there are multiple. - Don't complete argument stuff (options, layouts) at start of text. - For -t and -s, if there is no : then complete sessions but if there is a :, show a menu of all windows in the session rather than trying to complete the window name which is a bit useless if there are duplicates.
2020-05-16Drop having a separate type for style options and make them all strings,nicm
which allows formats to be expanded. Any styles without a '#{' are still validated when they are set but any with a '#{' are not. Formats are not expanded usefully in many cases yet, that will be changed later. To make this work, a few other changes: - set-option -a with a style option automatically appends a ",". - OSC 10 and 11 don't set the window-style option anymore, instead the fg and bg are stored in the pane struct and act as the defaults that can be overridden by window-style. - status-fg and -bg now override status-style instead of trying to keep them in sync.
2020-05-16Use a grid cell not a style for the pane style.nicm
2020-04-16Start menu with top item selected if no mouse, GitHub issue 2169.nicm
2020-04-15Use mode-style for selected items, like choose modes. GitHub issue 2166.nicm
2020-04-13Add helpers for the simple case of parse string and add to command queue.nicm
2020-04-13When adding a list of commands to the queue, instead of automaticallynicm
creating a new state for each group of commands, require the caller to create one and use it for all the commands in the list. This means the current target works even with list with multiple groups (which can happen if they are defined with newlines).
2020-04-13Move cmdq_state into cmd-queue.c.nicm
2020-04-13Rename cmdq_shared to cmdq_state which will better reflect what it isnicm
(going to be) used for.
2020-04-13Store a key event not a mouse event in the shared data.nicm
2020-04-13Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make itsnicm
use more clearly defined and preparation for some future work).
2020-03-24Add support for overlay popup boxes to show text or output temporarilynicm
above the normal layout. These work similarly to menus and are created with the display-popup command.
2020-03-20Fix positioning of menu in choose modes and a couple of keys in tree mode.nicm
2020-03-19Little bit of tidying.nicm
2019-09-16Change menu key bindings to Up and Down and also close it on any mousenicm
press if opened by key.
2019-07-09Add j and k for navigation in menus, GitHub issue 1828.nicm
2019-06-18Add a cmdq_continue function rather than twiddling the flag directly.nicm
2019-05-28Allow menu items to be disabled by putting a - at the start of theirnicm
name, rather than just including #[dim] which still allowed them to be chosen.
2019-05-28Change display-menu from taking a single string to a set of arguments,nicm
which is much easier to work with. Based on a diff from Avi Halachmi.
2019-05-26Do not accept choice unless mouse has actually moved before.nicm
2019-05-26Add formats for word and line under the mouse and use them to add somenicm
items to the pane menu.
2019-05-23Replace the split parser code (cfg.c and cmd-string.c) with a singlenicm
parser using yacc(1). This is a major change but is clearer and simpler and allows some edge cases to be made more consistent, as well as tidying up how aliases are handled. It will also allow some further improvements later. Entirely the same parser is now used for parsing the configuration file and for string commands. This means that constructs previously only available in .tmux.conf, such as %if, can now be used in string commands (for example, those given to if-shell - not commands invoked from the shell, they are still parsed by the shell itself). The only syntax change I am aware of is that #{} outside quotes or a comment is now considered a format and not a comment, so #{ is now a syntax error (notably, if it is at the start of a line). This also adds two new sections to the man page documenting the syntax and outlining how parsing and command execution works. Thanks to everyone who sent me test configs (they still all parse without errors - but this doesn't mean they still work as intended!). Thanks to Avi Halachmi for testing and man page improvements, also to jmc@ for reviewing the man page changes.
2019-05-20Replace the various identical error callbacks with a single one in cmd-queue.c.nicm
2019-05-12Add simple menus to tree, client, buffer modes.nicm