Commit Graph
102 Commits
Author SHA1 Message Date
Michael Grant 9837766857 Allow callers to override editor command 2026-09-14 05:35:00 +01:00
tmux update bot af29c080ba Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Correct a comparison ('\0' should be 0).
  If a pane has no scrollbar, don't bother to redraw it, and if redraw is deferred change scrollbar redraws into redraw-all-scrollbars not redraw entire window. GitHub issue 5529.
2026-08-25 01:46:56 +00:00
nicm 50ea32162f Correct a comparison ('\0' should be 0). 2026-08-25 01:46:55 +00:00
tmux update bot 9459c7ca64 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Clear the "waiting for editor" area before writing so stray characters aren't visible from underneath.
2026-07-15 13:29:09 +00:00
nicm 75c874c55b Clear the "waiting for editor" area before writing so stray characters
aren't visible from underneath.
2026-07-15 13:29:08 +00:00
Thomas Adam 6546fa0982 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Convert display-panes away from an overlay and into a mode. This is another step on the road of getting rid of overlays altogether (they are full of special cases; popups and menus are to go also eventually). We lose some of the styling of borders but gain the ability to run display-panes in another pane (perhaps not hugely useful but one never knows). The -b flag goes away as no longer useful.
2026-07-14 21:20:22 +01:00
nicm 1a02c9957c Convert display-panes away from an overlay and into a mode. This is
another step on the road of getting rid of overlays altogether (they are
full of special cases; popups and menus are to go also eventually). We
lose some of the styling of borders but gain the ability to run
display-panes in another pane (perhaps not hugely useful but one never
knows). The -b flag goes away as no longer useful.
2026-07-14 19:57:30 +00:00
Thomas Adam 25e2e1d671 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  build: don't exit
  build: always attempt portable merge
  build: capture openbsd-base before filtering
  build: fetch cutover master before merge
  Use _exit in child after fork, from Yayo Razo in GitHub issue 5376.
  Add missing calloc check and use fatal. Prompted by a similar change from Yayo Razo.
  actions: use published openbsd-git as base update
  github actions: automate updates
  Do not make pty fds blocking again until all the data has been consumed or control mode clients can get stuck, GitHub issue 5356 from Ben Maurer.
  Add formats and events for OSC 133 commmands, as well as a -T flag to set-hook -B to only fire when the format is true.
  Replace the notification system with events. Events can carry a payload of additional payload (to reduce problems with lifetime of objects) and are delivered to one or more event sinks. This is more powerful and reduces the complex dependencies between control mode and hooks. Events are now used for hooks, control mode notifications and for monitors (set-hook -B).
2026-07-13 09:22:25 +01:00
nicm d29aa12117 Replace the notification system with events. Events can carry a payload of
additional payload (to reduce problems with lifetime of objects) and are
delivered to one or more event sinks. This is more powerful and reduces the
complex dependencies between control mode and hooks. Events are now used for
hooks, control mode notifications and for monitors (set-hook -B).

wait-for can now wait for an event to fire (-E flag, with -F to for filter),
with -v to print the payload, as well as listing (-l) waiting clients on an
event and forcing one to wake (-w).

A few additional hooks are also now available (pane-created, pane-resized, etc)
and some of the existing ones have additional format variables available.
2026-07-10 13:38:45 +00:00
Thomas Adam 19d70a85fc Merge branch 'obsd-master' 2026-06-26 09:30:07 +01:00
nicm 3631f81236 Apply better colours to various builtin bits in modes. 2026-06-26 08:10:48 +00:00
Thomas Adam 72e768ef14 Merge branch 'obsd-master' 2026-06-19 20:00:06 +01:00
nicm d04b1ffca5 Use a floating pane for the buffer mode editor instead of a popup. 2026-06-19 18:37:10 +00:00
Thomas Adam e7c29d0ceb Merge branch 'obsd-master' 2026-06-19 19:00:05 +01:00
nicm 6c46358be8 Draw help directly instead of using a popup. 2026-06-19 17:37:26 +00:00
Thomas Adam bef4865d91 Merge branch 'obsd-master' 2026-03-12 16:01:08 +00:00
nicm fd62f419ac Add a short builtin help text for each mode accessible with C-h,
based on code from Patrick Motard in GitHub issue 4751.
2026-03-12 12:40:40 +00:00
Thomas Adam 615c27c117 Merge branch 'obsd-master' 2026-02-02 19:06:25 +00:00
nicm 3c3d9ce3a9 Break sorting out into a common file so formats and modes use the same
code. Also add -O for sorting to the list commands. From Dane Jensen in
GitHub issue 4813.
2026-02-02 10:08:30 +00:00
Thomas Adam e560a09db0 Merge branch 'obsd-master' 2025-10-28 15:16:58 +00:00
nicm 9bf8ca5856 Support case insensitive search in modes in the same way as copy mode
(like emacs, so all-lowercase means case insensitive). GitHub issue
4396.
2025-10-28 14:21:06 +00:00
Thomas Adam ac574b6782 Merge branch 'obsd-master' 2025-09-09 12:01:09 +01:00
nicm 50dafd6187 Remove some unnecessary assignments. 2025-09-09 08:49:22 +00:00
Thomas Adam b4f8340f16 Merge branch 'obsd-master' 2025-04-22 16:01:12 +01:00
nicm b905039ed2 Improve #? conditional expression in formats:
1) add support for else if, so
   #{?cond1,value1,#{?cond2,value2,else-value}} can be changed to
   #{?cond1,value1,cond2,value2,else-value};

2) add default empty string if there's no else value, so
   #{?cond1,value1,} can be changed to #{?cond1,value1}.

From David Mandelberg in GitHub issue 4451.
2025-04-22 12:23:26 +00:00
Thomas Adam c3c4524def Merge branch 'obsd-master' 2025-03-21 16:01:11 +00:00
nicm a541be3951 Add S-Up and S-Down to move windows in tree mode. From David Mandelberg
in GitHub issue 4415.
2025-03-21 13:36:42 +00:00
Thomas Adam 651891c3bd Merge branch 'obsd-master' 2024-08-04 12:01:09 +01:00
nicm 7b6fbe7262 Adjust the logic when deleting last buffer to better preserve the
selection: if selecting the element below the deleted one fails (because
as the last one), select the one above it instead. From Daniel Mueller,
GitHub issue 4043.
2024-08-04 08:53:43 +00:00
Thomas Adam 3c3643f580 Merge branch 'obsd-master' 2024-03-21 14:01:10 +00:00
nicm 0ae8b681b2 Use -p for default paste-buffer command in buffer mode, it will only do
anything if the application asked for it. From Gregory Anders.
2024-03-21 11:32:49 +00:00
Thomas Adam c449512be4 Merge branch 'obsd-master' 2022-11-03 10:01:11 +00:00
nicm 17290b9121 If there are no buffers, reset mode as soon as any key pressed. Fixes
crash reported by Gaoyang Zhang in GitHub issue 3373.
2022-11-03 08:41:53 +00:00
nicm 0a8f356c72 Spacing/style nits. 2022-05-30 12:55:25 +00:00
Nicholas Marriott 3a6d82b7c8 Some style nits. 2022-04-06 16:39:46 +01:00
Thomas Adam b0da0cee4d Merge branch 'obsd-master' into master 2021-08-20 22:01:46 +01:00
nicm 5f32b7d961 Hide struct args behind a couple of accessor functions. 2021-08-20 19:50:16 +00:00
nicm 6c659494f5 Fix warnings, from Jan Tache in GitHub issue 2692. 2021-06-10 07:45:43 +00:00
Nicholas Marriott 40467726e3 Fix warnings, from Jan Tache in GitHub issue 2692. 2021-05-03 06:39:17 +01:00
Thomas Adam 83cd593b9c Merge branch 'obsd-master' into master 2021-04-12 10:01:27 +01:00
nicm cd208c9d72 Permit shortcut keys in buffer, client, tree modes to be configured with
a format; the default remains the line number. GitHub issue 2636.
2021-04-12 06:50:25 +00:00
Thomas Adam e288ea153c Merge branch 'obsd-master' into master 2020-12-03 08:01:22 +00:00
nicm fd451aa796 Redraw any visible modes when status line changes so that formats like
the pane title are updated. GitHub issue 2487. Also a man page fix from
jmc.
2020-12-03 07:12:11 +00:00
nicm 72984c4834 Move editor stuff to common code in popup.c. 2020-05-16 16:13:09 +00:00
nicm d67245c734 Add a customize mode where keys and options may be browsed and changed,
includes adding a brief description of each option. Bound to "C" by
default.
2020-05-16 16:02:24 +00:00
nicm 2df75aa117 Use VIS_CSTYLE for paste buffers also. 2020-05-16 15:35:19 +00:00
nicm 78595457f9 Add 'e' key in buffer mode to open the buffer in an editor. 2020-05-16 15:24:28 +00:00
nicm 0dd1944206 Tweak the default choose modes formats:
- Only show pane title if it is not default and not empty.
- Add a prettier time format and use that instead of long ctime().
- Remove clutter and change the order.
2020-05-16 14:10:29 +00:00
Nicholas Marriott 4cb1d3d7a9 Move editor stuff to common code in popup.c. 2020-05-13 06:58:07 +01:00
Nicholas Marriott a61cbf1c33 Add a customize mode where options may be browsed and changed, includes adding
a brief description of each option. Bound to "C" by default.
2020-05-08 19:10:09 +01:00