1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-22 16:42:56 -08:00
Commit Graph

28 Commits

Author SHA1 Message Date
nicm
5355e038b0 Add a session, pane and user mouse range types for the status line and
add format variables for mouse_status_line and mouse_status_range so
they can be associated with different commands in the key bindings.
GitHub issue 3652.
2023-08-17 14:10:28 +00:00
nicm
0803d750f4 Trim can generate strings longer than the original if there are many #s,
so create a bigger buffer. Reported by Robert Morris.
2023-08-07 10:04:29 +00:00
nicm
f45ad91f7a Initialize copy_width before adjusting it, GitHub issue 3079. 2022-02-22 11:07:25 +00:00
nicm
173e82258f Do not allow inline styles to replace mode-style for the selected item,
from Alexis Hildebrandt in GitHub issue 2946.
2021-10-26 12:22:23 +00:00
nicm
50e21e7ba4 Fix handling of leading #s when working out width. 2021-08-22 15:33:14 +00:00
nicm
84b35168a3 Add an "absolute-centre" alignment to use the centre of the total space
instead of only the available space. From Magnus Gross in GitHub issue 2578.
2021-03-11 06:41:04 +00:00
nicm
20cd170d57 Make replacement of ##s consistent when drawing formats, whether
followed by [ or not. Add a flag (e) to the q: format modifier to double
up #s and use it for the window_flags format variable so it doesn't end
up escaping any following text. GitHub issue 2485.
2020-12-01 08:12:58 +00:00
nicm
987e1c89ab Change how escaping is processed for formats so that ## and # can be
used in styles. Also add a 'w' format modifier for the width. From Chas
J Owens IV in GitHub issue 2389.
2020-11-09 09:10:10 +00:00
nicm
523d1dae31 Add an option to set the pane border lines style from a choice of single
lines (ACS or UTF-8), double or heavy (UTF-8), simple (plain ASCII) or
number (the pane numbers). Lines that won't work on a non-UTF-8 terminal
are translated back into ACS when they are output.
2020-05-16 16:26:34 +00:00
nicm
67c16a7c4d 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
83e83a916d 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.
2020-05-16 15:34:08 +00:00
nicm
a6c9106f9d Add 'e' key in buffer mode to open the buffer in an editor. 2020-05-16 15:24:28 +00:00
nicm
acf6cf7c35 More style nits. 2020-04-09 15:35:27 +00:00
nicm
b19d25a05c Use correct width of right marker so it doesn't draw over status right
when more than one character. Reported by Tyler Culp.
2020-03-07 10:58:32 +00:00
nicm
9446d75284 Do not hang in format_trim_* on invalid UTF-8 characters. 2020-01-08 14:40:52 +00:00
nicm
c8f0e7027f Add push-default and pop-default in styles to change the default colours
and attributes and use them to restore the previous behaviour of
window-status-style being the default for window-status-format in the
status line. From John Drouhard in GitHub issue 1912.
2019-09-15 21:42:57 +00:00
nicm
1fabeb5afd Correctly clear underscore colour in grid_get_cell1, also fix struct
grid_cell to avoid padding. Fixes increased memory use reported by Suraj
N Kurapati.
2019-07-06 20:37:29 +00:00
nicm
db7cf71af1 Add a "fill" style attribute to clear the entire format drawing area in
a colour, GitHub issue 1815.
2019-07-01 06:56:00 +00:00
nicm
8b65c88bf6 Do not loop forever if a menu item contains invisible characters,
reported by Thomas Sattler.
2019-06-14 15:35:58 +00:00
nicm
019929254d Fix drawing of status-right when it is aligned to the centre, GitHub
issue 1754.
2019-05-23 14:44:33 +00:00
nicm
770b648cf8 Do not loop forever if there is a nonprintable character in the format. 2019-04-24 20:27:52 +00:00
nicm
cff1d32dc0 Fix offset of list ranges. 2019-03-28 22:18:46 +00:00
nicm
967b71d8ae Include function name in logging. 2019-03-20 07:30:05 +00:00
nicm
b6b6b1b7da Do not leak ranges on error. 2019-03-20 07:28:31 +00:00
nicm
38c9d6a44f Ignore invalid styles rather than throwing away the whole format, this
matches what we used to do.
2019-03-20 07:24:03 +00:00
nicm
180e3f4c9d Bit more logging to show drawing errors. 2019-03-20 07:13:02 +00:00
nicm
d680d99b21 Free temporary screens when writing format. 2019-03-18 21:55:04 +00:00
nicm
4ffcb1c8b1 Extend the #[] style syntax and use that together with previous format
changes to allow the status line to be entirely configured with a single
option.

Now that it is possible to configure their content, enable the existing
code that lets the status line be multiple lines in height. The status
option can now take a value of 2, 3, 4 or 5 (as well as the previous on
or off) to configure more than one line. The new status-format array
option configures the format of each line, the default just references
the existing status-* options, although some of the more obscure status
options may be eliminated in time.

Additions to the #[] syntax are: "align" to specify alignment (left,
centre, right), "list" for the window list and "range" to configure
ranges of text for the mouse bindings.

The "align" keyword can also be used to specify alignment of entries in
tree mode and the pane status lines.
2019-03-18 20:53:33 +00:00