OpenBSD CVS

CVS log for src/usr.bin/tmux/popup.c


[BACK] Up to [local] / src / usr.bin / tmux

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.53 / (download) - annotate - [select for diffs], Thu Mar 21 11:30:42 2024 UTC (8 weeks, 3 days ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

Do not notify window-layout-changed if the window is about to be
destroyed (since it may have been freed by the time the notify happens),
from Romain Francoise in GitHub issue 3860.

Revision 1.52 / (download) - annotate - [select for diffs], Tue Aug 15 07:01:47 2023 UTC (9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

Add an option menu-selected-style to configure the currently selected
menu item, from Alexis Hildebrandt.

Revision 1.51 / (download) - annotate - [select for diffs], Tue Aug 8 08:08:47 2023 UTC (9 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored)

Add options and flags for menu styles similar to those existing for
popups, from Alexis Hildebrandt. GitHub issue 3650.

Revision 1.50 / (download) - annotate - [select for diffs], Wed Jun 21 06:28:18 2023 UTC (10 months, 4 weeks ago) by nicm
Branch: MAIN
Changes since 1.49: +3 -1 lines
Diff to previous 1.49 (colored)

Check fdopen return value, from Christian Menges.

Revision 1.49 / (download) - annotate - [select for diffs], Thu Jun 8 11:17:28 2023 UTC (11 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored)

Fix mismatch between function prototype and definition, from Anindya
Mukherjee.

Revision 1.48 / (download) - annotate - [select for diffs], Wed Mar 15 19:23:22 2023 UTC (14 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.47: +2 -1 lines
Diff to previous 1.47 (colored)

Do not leak screen in popups, GitHub issue 3492.

Revision 1.47 / (download) - annotate - [select for diffs], Fri Jan 20 21:36:00 2023 UTC (15 months, 4 weeks ago) by nicm
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

Add a flag to display-menu to select the manu item chosen first, GitHub
issue 3442.

Revision 1.46 / (download) - annotate - [select for diffs], Tue Feb 22 11:01:57 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

Use correct size for screen when popup is created without borders.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Feb 16 18:55:05 2022 UTC (2 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.44: +5 -5 lines
Diff to previous 1.44 (colored)

Support more mouse buttons when the terminal sends them, GitHub issue
3055.

Revision 1.44 / (download) - annotate - [select for diffs], Tue Feb 1 18:12:20 2022 UTC (2 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

A menu must be shown on a client, so always give the client when adding
the items. Also fix mode menus.

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jan 17 10:40:03 2022 UTC (2 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.42: +3 -2 lines
Diff to previous 1.42 (colored)

Do not try to strdup NULL, from seL4 at disroot dot org in GitHub issue
3038.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Oct 25 09:38:36 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.41: +21 -5 lines
Diff to previous 1.41 (colored)

Add -s and -S to display-popup to set popup and border style, from
Alexis Hildebrandt in GitHub issue 2931.

Revision 1.41 / (download) - annotate - [select for diffs], Mon Oct 25 09:22:17 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.40: +42 -34 lines
Diff to previous 1.40 (colored)

Instead of setting the popup default colours in the draw callback, set
it up in popup_display and follow the same routine as panes in the draw
and init_ctx callbacks - use the palette if the option value is default.
Allows application-set fg and bg to work in panes again.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Oct 20 09:52:27 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.39: +1 -2 lines
Diff to previous 1.39 (colored)

Remove a TODO comment.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Oct 20 09:50:40 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.38: +10 -5 lines
Diff to previous 1.38 (colored)

Add -T to set a popup title, from Alexis Hildebrandt in GitHub issue 2941.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Oct 14 13:19:01 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.37: +29 -17 lines
Diff to previous 1.37 (colored)

Add popup-border-lines option to set popup line style, from Alexis
Hildebrandt, GitHub issue 2930.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Oct 13 09:28:36 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.36: +12 -4 lines
Diff to previous 1.36 (colored)

Add popup-style and popup-border-style options, from Alexis Hildebrandt
in GitHub issue 2927.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Oct 11 13:27:50 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.35: +41 -10 lines
Diff to previous 1.35 (colored)

Make positions hidden by overlays range-based rather than character-based,
from Anindya Mukherjee.

Revision 1.35 / (download) - annotate - [select for diffs], Mon Oct 11 10:55:30 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.34: +6 -5 lines
Diff to previous 1.34 (colored)

Add -e flag to set environment for popup, from Alexis Hildebrandt in
GitHub issue 2924.

Revision 1.34 / (download) - annotate - [select for diffs], Tue Aug 17 08:22:44 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.33: +0 -1 lines
Diff to previous 1.33 (colored)

Revert previous; this is not how it should work.

Revision 1.33 / (download) - annotate - [select for diffs], Tue Aug 17 07:14:33 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.32: +2 -1 lines
Diff to previous 1.32 (colored)

Start sync before drawing popup.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Aug 13 23:05:40 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.31: +16 -13 lines
Diff to previous 1.31 (colored)

Tweak how mouse works on popup: only Meta alone resizes or moves, not
Meta with other modifiers; button 2 on the left or top border opens
menu, right or bottom resizes; button 1 on any border moves.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Aug 13 20:04:45 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

Check callback needs to only return 0 (text should be suppressed) if
menu returns 0, otherwise it should check the popup also.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Aug 13 19:55:11 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.29: +13 -4 lines
Diff to previous 1.29 (colored)

Fill in some other bits on new panes.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Aug 13 19:27:25 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.28: +57 -4 lines
Diff to previous 1.28 (colored)

Add menu options to convert a popup into a pane.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Aug 13 19:25:24 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.27: +9 -2 lines
Diff to previous 1.27 (colored)

Adjust overlay check callback before drawing data from pty.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Aug 13 18:54:54 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.26: +125 -18 lines
Diff to previous 1.26 (colored)

Add a menu when a popup is present (mouse only for now).

Revision 1.26 / (download) - annotate - [select for diffs], Fri Aug 13 17:03:29 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.25: +69 -22 lines
Diff to previous 1.25 (colored)

Add -B flag to remove border from popup.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Aug 11 20:49:55 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.24: +15 -6 lines
Diff to previous 1.24 (colored)

Break the colour palette into a struct rather than just a single array
and use that to support the OSC palette-setting sequences in popups.
Also add a pane-colours array option to specify the defaults. GitHub
issue 2815.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Aug 5 09:43:51 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.23: +1 -5 lines
Diff to previous 1.23 (colored)

Do not freeze output in panes when a popup is open, let them continue to
redraw. From Anindya Mukherjee .

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jul 21 08:06:36 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.22: +61 -5 lines
Diff to previous 1.22 (colored)

Do not close popups on resize, instead adjust them to fit, from Anindya
Mukherjee.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Mar 2 10:56:45 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.21: +19 -190 lines
Diff to previous 1.21 (colored)

Drop support for popups where the content is provided directly to tmux
(which does not have many practical uses) and only support running a
program in the popup. display-popup is now simpler and can accept
multiple arguments to avoid escaping problems (like the other commands).

Revision 1.21 / (download) - annotate - [select for diffs], Tue Feb 2 13:03:03 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Fix popup mouse position.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Sep 22 06:44:52 2020 UTC (3 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

Resize screen to the correct size (borders need to be taken off).

Revision 1.19 / (download) - annotate - [select for diffs], Sat May 16 16:35:13 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

Separate key flags and modifiers, log key flags, make the "xterm" flag
more explicit and fix M- keys with a leading escape.

Revision 1.18 / (download) - annotate - [select for diffs], Sat May 16 16:30:59 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

xterm-keys has been on by default for five years and all other modern
terminals use these key sequences by default. Merge the code into the
main tty and input tree processing (converting the latter to use a tree
rather than a table at the same time) and make the option a no-op.

Revision 1.17 / (download) - annotate - [select for diffs], Sat May 16 16:13:09 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.16: +99 -1 lines
Diff to previous 1.16 (colored)

Move editor stuff to common code in popup.c.

Revision 1.16 / (download) - annotate - [select for diffs], Sat May 16 15:41:54 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.15: +4 -2 lines
Diff to previous 1.15 (colored)

Only redraw popup on the client it belongs to.

Revision 1.15 / (download) - annotate - [select for diffs], Sat May 16 15:34:08 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.14: +60 -12 lines
Diff to previous 1.14 (colored)

Do not hoke into struct window_pane from the tty code and instead set
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.

Revision 1.14 / (download) - annotate - [select for diffs], Sat May 16 15:24:28 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.13: +9 -2 lines
Diff to previous 1.13 (colored)

Add 'e' key in buffer mode to open the buffer in an editor.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Apr 13 18:59:41 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.12: +16 -24 lines
Diff to previous 1.12 (colored)

Add helpers for the simple case of parse string and add to command queue.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Apr 13 15:55:51 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.11: +5 -2 lines
Diff to previous 1.11 (colored)

When adding a list of commands to the queue, instead of automatically
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).

Revision 1.11 / (download) - annotate - [select for diffs], Mon Apr 13 14:46:04 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

Move cmdq_state into cmd-queue.c.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Apr 13 14:04:25 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

Rename cmdq_shared to cmdq_state which will better reflect what it is
(going to be) used for.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Apr 13 13:42:35 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

Store a key event not a mouse event in the shared data.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Apr 13 10:59:59 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.7: +7 -7 lines
Diff to previous 1.7 (colored)

Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make its
use more clearly defined and preparation for some future work).

Revision 1.7 / (download) - annotate - [select for diffs], Tue Apr 7 13:33:00 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

Limit size to 1x1 (total size 3x3).

Revision 1.6 / (download) - annotate - [select for diffs], Wed Apr 1 09:05:27 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.5: +11 -4 lines
Diff to previous 1.5 (colored)

Support mouse in popups.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Mar 31 06:35:38 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.4: +2 -3 lines
Diff to previous 1.4 (colored)

Detach reply escape sequences from the pane so they work in popups.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Mar 30 07:42:44 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.3: +3 -4 lines
Diff to previous 1.3 (colored)

Do not check flags after the popup struct has been freed.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Mar 28 09:51:12 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.2: +5 -2 lines
Diff to previous 1.2 (colored)

Make two -E only close popup automatically if the command exited with 0.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Mar 28 09:39:44 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.1: +18 -4 lines
Diff to previous 1.1 (colored)

Fix how popup height is calculated to take embedded newlines into account.

Revision 1.1 / (download) - annotate - [select for diffs], Tue Mar 24 08:09:44 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN

Add support for overlay popup boxes to show text or output temporarily
above the normal layout. These work similarly to menus and are created
with the display-popup command.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.