OpenBSD CVS

CVS log for src/usr.bin/tmux/screen-write.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.225 / (download) - annotate - [select for diffs], Thu Mar 21 12:10:57 2024 UTC (8 weeks, 2 days ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.224: +2 -2 lines
Diff to previous 1.224 (colored)

Write padding character into the right position.

Revision 1.222.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:08:24 2023 UTC (5 months, 4 weeks ago) by bluhm
Branch: OPENBSD_7_4
Changes since 1.222: +5 -1 lines
Diff to previous 1.222 (colored) next main 1.223 (colored)

Do not allow combined UTF-8 characters that are too long, GitHub issue
3729.
from nicm@

this is errata/7.4/005_tmux.patch.sig

Revision 1.224 / (download) - annotate - [select for diffs], Mon Oct 30 16:05:30 2023 UTC (6 months, 2 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.223: +5 -1 lines
Diff to previous 1.223 (colored)

Do not allow combined UTF-8 characters that are too long, GitHub issue
3729.

Revision 1.223 / (download) - annotate - [select for diffs], Mon Oct 23 08:12:00 2023 UTC (6 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.222: +2 -2 lines
Diff to previous 1.222 (colored)

Unzoom window at start of destroy so it doesn't happen later (when
destroying panes) after the layout has been freed, GitHub issue 3717.

Revision 1.222 / (download) - annotate - [select for diffs], Fri Sep 15 15:49:05 2023 UTC (8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE
Branch point for: OPENBSD_7_4
Changes since 1.221: +88 -99 lines
Diff to previous 1.221 (colored)

Change UTF-8 combining to inspect the previous character at the cursor
position rather than keeping the last character from the input stream,
this is how most terminals work and fixes problems with displaying these
characters in vim. GitHub issue 3600.

Revision 1.221 / (download) - annotate - [select for diffs], Thu Sep 14 13:01:35 2023 UTC (8 months ago) by nicm
Branch: MAIN
Changes since 1.220: +3 -4 lines
Diff to previous 1.220 (colored)

Reset combine flag only if text is actually processed.

Revision 1.220 / (download) - annotate - [select for diffs], Fri Sep 1 16:01:54 2023 UTC (8 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.219: +3 -1 lines
Diff to previous 1.219 (colored)

Clear combine flag when a non-UTF-8 set of characters is encountered.

Revision 1.219 / (download) - annotate - [select for diffs], Fri Sep 1 14:29:11 2023 UTC (8 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.218: +39 -29 lines
Diff to previous 1.218 (colored)

Rewrite combined character handling to be more consistent and to support
newer Unicode combined characters (which we have to "know" are combined
since they are not width zero). GitHub issue 3600.

Revision 1.218 / (download) - annotate - [select for diffs], Tue Aug 15 07:01:47 2023 UTC (9 months ago) by nicm
Branch: MAIN
Changes since 1.217: +2 -2 lines
Diff to previous 1.217 (colored)

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

Revision 1.217 / (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.216: +5 -4 lines
Diff to previous 1.216 (colored)

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

Revision 1.216 / (download) - annotate - [select for diffs], Tue Aug 8 07:41:04 2023 UTC (9 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.215: +84 -66 lines
Diff to previous 1.215 (colored)

Extend the menu drawing function to support custom characters and
styles, from Alexis Hildebrandt.

Revision 1.215 / (download) - annotate - [select for diffs], Fri Jul 14 19:32:59 2023 UTC (10 months ago) by nicm
Branch: MAIN
Changes since 1.214: +4 -2 lines
Diff to previous 1.214 (colored)

Set extended keys flag again after reset, from Eric T Johnson.

Revision 1.214 / (download) - annotate - [select for diffs], Mon Mar 27 08:31:32 2023 UTC (13 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.213: +7 -1 lines
Diff to previous 1.213 (colored)

For passthrough, don't write to clients attached to different sessions,
based on a fix from Sergei Grechanik.

Revision 1.213 / (download) - annotate - [select for diffs], Fri Feb 10 14:01:43 2023 UTC (15 months, 1 week ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.212: +22 -14 lines
Diff to previous 1.212 (colored)

Fix cursor position after zero width space, GitHub issue 3469.

Revision 1.212 / (download) - annotate - [select for diffs], Fri Dec 16 08:19:58 2022 UTC (17 months ago) by nicm
Branch: MAIN
Changes since 1.211: +12 -4 lines
Diff to previous 1.211 (colored)

Make U+FE0F VARIATION SELECTOR-16 change the width from 1 to 2. GitHub
issue 3409.

Revision 1.211 / (download) - annotate - [select for diffs], Tue Oct 25 17:53:31 2022 UTC (18 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.210: +7 -10 lines
Diff to previous 1.210 (colored)

Initialize context before testing it.

Revision 1.210 / (download) - annotate - [select for diffs], Tue Oct 25 09:04:49 2022 UTC (18 months, 3 weeks ago) by nicm
Branch: MAIN
Changes since 1.209: +13 -7 lines
Diff to previous 1.209 (colored)

Do not fire redraw callback if NULL.

Revision 1.209 / (download) - annotate - [select for diffs], Tue Aug 2 11:09:26 2022 UTC (21 months, 2 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.208: +4 -2 lines
Diff to previous 1.208 (colored)

Add a third state "all" to allow-passthrough to work even in invisible
panes, from Sergei Grechanik in GitHub issue 3274.

Revision 1.208 / (download) - annotate - [select for diffs], Thu Jun 9 09:12:55 2022 UTC (23 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.207: +4 -2 lines
Diff to previous 1.207 (colored)

If an application gives the first parameter to OSC 52, validate and pass
on to outside terminal. GitHub issue 3192.

Revision 1.207 / (download) - annotate - [select for diffs], Thu Mar 17 13:39:13 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.206: +4 -2 lines
Diff to previous 1.206 (colored)

Check scroll-on-clear for ED also.

Revision 1.206 / (download) - annotate - [select for diffs], Thu Mar 17 11:35:37 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.205: +6 -2 lines
Diff to previous 1.205 (colored)

Add an option (scroll-on-clear) to control if tmux scrolls into history
on clear, from Robert Lange in GitHub issue 3121.

Revision 1.205 / (download) - annotate - [select for diffs], Tue Oct 26 12:22:23 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.204: +6 -4 lines
Diff to previous 1.204 (colored)

Do not allow inline styles to replace mode-style for the selected item,
from Alexis Hildebrandt in GitHub issue 2946.

Revision 1.204 / (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.203: +3 -3 lines
Diff to previous 1.203 (colored)

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

Revision 1.203 / (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.202: +5 -3 lines
Diff to previous 1.202 (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.202 / (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.201: +17 -12 lines
Diff to previous 1.201 (colored)

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

Revision 1.201 / (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.200: +59 -13 lines
Diff to previous 1.200 (colored)

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

Revision 1.200 / (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.199: +9 -5 lines
Diff to previous 1.199 (colored)

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

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

Be more sophisticated about enabling synchronized updates when there is
an overlay and treat it like the active pane (use for commands which
move the cursor only). When there is an overlay also use it for all
panes and not just the active pane. GitHub issue 2826.

Revision 1.198 / (download) - annotate - [select for diffs], Thu Aug 12 11:35:53 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.197: +3 -3 lines
Diff to previous 1.197 (colored)

Restore saved cursor position after a ZWJ rather than recalculating it.

Revision 1.197 / (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.196: +26 -16 lines
Diff to previous 1.196 (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.196 / (download) - annotate - [select for diffs], Fri Aug 6 09:34:09 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.195: +29 -5 lines
Diff to previous 1.195 (colored)

Add basic support for zero width joiners, GitHub issues 1605 and 2784.

Revision 1.195 / (download) - annotate - [select for diffs], Fri Aug 6 07:32:21 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.194: +2 -2 lines
Diff to previous 1.194 (colored)

Another minor fix - do not draw positions that are under the popup with
spaces, from Anindya Mukherjee. Also a typo fix from Linus Arver.

Revision 1.194 / (download) - annotate - [select for diffs], Thu Jun 10 07:43:44 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.193: +7 -1 lines
Diff to previous 1.193 (colored)

Improve logging of screen mode changes.

Revision 1.193 / (download) - annotate - [select for diffs], Fri Jan 29 09:48:43 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.192: +205 -172 lines
Diff to previous 1.192 (colored)

Trim output overwritten by later text or clears completely rather than
only in a few cases. This means we can better track when a line should
wrap. GitHub issue 2537.

Revision 1.192 / (download) - annotate - [select for diffs], Wed Jan 27 10:42:52 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.191: +5 -1 lines
Diff to previous 1.191 (colored)

Flush pending output before entering or exiting alternate screen rather
than leaking it, oss-fuzz issue 29959.

Revision 1.191 / (download) - annotate - [select for diffs], Fri Jan 22 11:28:33 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.190: +7 -26 lines
Diff to previous 1.190 (colored)

Revert clear changes to writing as they don't work properly, better
change to come.

Revision 1.190 / (download) - annotate - [select for diffs], Mon Jan 18 10:27:54 2021 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.189: +26 -8 lines
Diff to previous 1.189 (colored)

There is no need to clear every line entirely before drawing to it, this
means moving the cursor and messes up wrapping. Better to just clear the
sections that aren't written over. GitHub issue 2537.

Revision 1.189 / (download) - annotate - [select for diffs], Mon Dec 7 09:23:57 2020 UTC (3 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.188: +1 -3 lines
Diff to previous 1.188 (colored)

Do not clear the wrapped flag on linefeeds if it is already set - this
does not appear to be what applications want. GitHub issue 2478 and 2414.

Revision 1.188 / (download) - annotate - [select for diffs], Mon Nov 9 08:42:43 2020 UTC (3 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.187: +1 -2 lines
Diff to previous 1.187 (colored)

Remove some old debug logging.

Revision 1.187 / (download) - annotate - [select for diffs], Tue Jul 21 05:24:33 2020 UTC (3 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.186: +5 -2 lines
Diff to previous 1.186 (colored)

Fix show-buffer when run from inside tmux, GitHub issue 2314.

Revision 1.186 / (download) - annotate - [select for diffs], Mon Jul 6 10:07:02 2020 UTC (3 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.185: +23 -40 lines
Diff to previous 1.185 (colored)

Do not eliminate redundant clears, the code is wrong and doing it
correctly wouldn't be worth it. GitHub issue 2298.

Revision 1.185 / (download) - annotate - [select for diffs], Thu Jun 18 08:41:56 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.184: +3 -2 lines
Diff to previous 1.184 (colored)

The redraw callback could be fired with a NULL pane if it updates while
in a mode, problem reported by Martin Vahlensieck.

Revision 1.184 / (download) - annotate - [select for diffs], Tue Jun 2 20:51:46 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.183: +2 -6 lines
Diff to previous 1.183 (colored)

Move the code to set up a padding cell into grid.c.

Revision 1.183 / (download) - annotate - [select for diffs], Tue Jun 2 20:10:23 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.182: +2 -2 lines
Diff to previous 1.182 (colored)

Allow UTF-8 characters of width 0 to be stored, it is useful to be able
to put padding cells in as width 0.

Revision 1.182 / (download) - annotate - [select for diffs], Wed May 27 06:23:23 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.181: +2 -2 lines
Diff to previous 1.181 (colored)

Make padding cell a valid character.

Revision 1.181 / (download) - annotate - [select for diffs], Mon May 25 18:55:36 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.180: +2 -2 lines
Diff to previous 1.180 (colored)

Fix definition of padding cells so they are not extended cells.

Revision 1.180 / (download) - annotate - [select for diffs], Sat May 16 16:22:01 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.179: +3 -3 lines
Diff to previous 1.179 (colored)

Add screen write flags instead of individual bits and fix line length
calculation with padding.

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

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.

Revision 1.178 / (download) - annotate - [select for diffs], Sat May 16 15:34:08 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.177: +146 -23 lines
Diff to previous 1.177 (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.177 / (download) - annotate - [select for diffs], Sat May 16 15:27:08 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.176: +4 -1 lines
Diff to previous 1.176 (colored)

Rename and tidy some stuff in struct tty_ctx.

Revision 1.176 / (download) - annotate - [select for diffs], Sat May 16 15:11:52 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.175: +3 -38 lines
Diff to previous 1.175 (colored)

Copy mode search improvements:

- Add styles for the search marking styles (copy-mode-match-style and
  copy-mode-current-match-style).

- Show the current match (the one with the cursor on it) in a different style.

- Copying without a selection will copy the current match if there is one.

Revision 1.175 / (download) - annotate - [select for diffs], Tue Apr 21 13:48:56 2020 UTC (4 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.174: +3 -2 lines
Diff to previous 1.174 (colored)

Move the background colour to clear with (if any) up as well as the data
when scrolling, redraw problem reported by sthen@.

Revision 1.174 / (download) - annotate - [select for diffs], Mon Apr 20 15:49:05 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.173: +4 -2 lines
Diff to previous 1.173 (colored)

Always start sync for output in panes that are not the active pane.

Revision 1.173 / (download) - annotate - [select for diffs], Mon Apr 20 14:59:31 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.172: +1 -10 lines
Diff to previous 1.172 (colored)

Change how sync works to always send the end sequence after all output
is done when we are returning to the event loop (since we always move
the cursor at that point). Also a man fix from jmc.

Revision 1.172 / (download) - annotate - [select for diffs], Sat Apr 18 17:20:25 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.171: +37 -33 lines
Diff to previous 1.171 (colored)

A resize can realloc so cannot cache the value of the list pointer.

Revision 1.171 / (download) - annotate - [select for diffs], Sat Apr 18 15:22:05 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.170: +2 -1 lines
Diff to previous 1.170 (colored)

Reset background colour on scrolled line.

Revision 1.170 / (download) - annotate - [select for diffs], Sat Apr 18 15:12:28 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.169: +44 -22 lines
Diff to previous 1.169 (colored)

There is no point in keeping a bunch of different text buffers for each
line when writing, we only need one as big as the line width - there
can't be any more text than that since newer will overwrite older.

Revision 1.169 / (download) - annotate - [select for diffs], Sat Apr 18 07:19:29 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.168: +5 -1 lines
Diff to previous 1.168 (colored)

Add formats for pane written/skipped bytes for debugging.

Revision 1.168 / (download) - annotate - [select for diffs], Fri Apr 17 15:44:58 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.167: +15 -20 lines
Diff to previous 1.167 (colored)

There is no point allocating a new item and putting it on the list when
the whole line is cleared line, there is never any point in doing it
more than once. Instead store the background colour alone.

Revision 1.167 / (download) - annotate - [select for diffs], Thu Apr 16 21:46:43 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.166: +5 -2 lines
Diff to previous 1.166 (colored)

Return to sending sync around clears.

Revision 1.166 / (download) - annotate - [select for diffs], Thu Apr 16 21:16:24 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.165: +1 -9 lines
Diff to previous 1.165 (colored)

Do not need to set up a tty context for clearing lines now.

Revision 1.165 / (download) - annotate - [select for diffs], Thu Apr 16 20:32:51 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.164: +167 -40 lines
Diff to previous 1.164 (colored)

Collect up line clears like text within the available data so we don't
need to flush everything.

Revision 1.164 / (download) - annotate - [select for diffs], Thu Apr 16 17:24:28 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.163: +31 -27 lines
Diff to previous 1.163 (colored)

Log what caused a flush for better visibility on what could be improved.

Revision 1.163 / (download) - annotate - [select for diffs], Thu Apr 16 16:13:56 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.162: +53 -49 lines
Diff to previous 1.162 (colored)

Only start and stop sync for operations like clear and scroll where
there is a better chance more data will be on the way.

Revision 1.162 / (download) - annotate - [select for diffs], Thu Apr 16 13:35:24 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.161: +11 -2 lines
Diff to previous 1.161 (colored)

Add support for the iTerm2 sychronized updates escape sequence which
drastically reduces flickering.

Revision 1.161 / (download) - annotate - [select for diffs], Wed Apr 15 16:11:23 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.160: +14 -13 lines
Diff to previous 1.160 (colored)

Use mode-style for selected items, like choose modes. GitHub issue 2166.

Revision 1.160 / (download) - annotate - [select for diffs], Thu Nov 28 10:17:22 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.159: +3 -2 lines
Diff to previous 1.159 (colored)

Parse out DA features.

Revision 1.159 / (download) - annotate - [select for diffs], Tue Sep 24 20:44:58 2019 UTC (4 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.158: +3 -5 lines
Diff to previous 1.158 (colored)

Some minor performance improvements - most notably, don't search the
input state table if the next character matches the same state as before.

Revision 1.158 / (download) - annotate - [select for diffs], Tue Sep 24 15:52:14 2019 UTC (4 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.157: +11 -8 lines
Diff to previous 1.157 (colored)

Couple of bits of minor cleanup.

Revision 1.157 / (download) - annotate - [select for diffs], Mon Aug 5 06:42:02 2019 UTC (4 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.156: +26 -1 lines
Diff to previous 1.156 (colored)

Add support for the SD (scroll down) escape sequence, GitHub issue 1861.

Revision 1.156 / (download) - annotate - [select for diffs], Mon Jul 8 11:38:14 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.155: +2 -6 lines
Diff to previous 1.155 (colored)

Use the clear history function for the 3J sequence rather than doing it manually.

Revision 1.155 / (download) - annotate - [select for diffs], Sat Jul 6 20:37:29 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.154: +2 -2 lines
Diff to previous 1.154 (colored)

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.

Revision 1.154 / (download) - annotate - [select for diffs], Thu Jun 27 15:17:41 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.153: +2 -2 lines
Diff to previous 1.153 (colored)

Add support for underscore colours with Setulc capability, mostly from
Kai Moschcau.

Revision 1.153 / (download) - annotate - [select for diffs], Tue May 28 09:50:54 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.152: +12 -5 lines
Diff to previous 1.152 (colored)

Allow menu items to be disabled by putting a - at the start of their
name, rather than just including #[dim] which still allowed them to be
chosen.

Revision 1.152 / (download) - annotate - [select for diffs], Fri May 10 14:12:47 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.151: +39 -1 lines
Diff to previous 1.151 (colored)

Add a function to draw a simple menu onto a screen.

Revision 1.151 / (download) - annotate - [select for diffs], Thu Apr 18 11:07:28 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.150: +2 -2 lines
Diff to previous 1.150 (colored)

Pass target client and session to load_cfg from source-file so formats
work. Reported by Thomas Sattler.

Revision 1.150 / (download) - annotate - [select for diffs], Wed Apr 3 06:43:04 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.149: +3 -4 lines
Diff to previous 1.149 (colored)

screen_write_fast_copy can no longer assume the target screen is default
(it isn't for the pane status lines).

Revision 1.149 / (download) - annotate - [select for diffs], Mon Mar 18 20:53:33 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.148: +1 -108 lines
Diff to previous 1.148 (colored)

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.

Revision 1.148 / (download) - annotate - [select for diffs], Thu Mar 14 09:53:52 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.147: +9 -9 lines
Diff to previous 1.147 (colored)

Add a wrapper (struct style) around styles rather than using the
grid_cell directly. There will be some non-cell members soon.

Revision 1.147 / (download) - annotate - [select for diffs], Tue Mar 12 20:02:47 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.146: +4 -3 lines
Diff to previous 1.146 (colored)

DECRC and DECSC apparently need to preserve origin mode as well, based
on a fix from Marc Reisner.

Revision 1.146 / (download) - annotate - [select for diffs], Tue Mar 12 18:30:08 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.145: +6 -6 lines
Diff to previous 1.145 (colored)

Fix HPA in origin mode.

Revision 1.145 / (download) - annotate - [select for diffs], Tue Mar 12 13:14:14 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.144: +7 -2 lines
Diff to previous 1.144 (colored)

Fix wrapping after origin mode change.

Revision 1.144 / (download) - annotate - [select for diffs], Tue Mar 12 07:39:27 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.143: +28 -20 lines
Diff to previous 1.143 (colored)

Add support for origin mode (DECOM, SM/RM ?6), from Marc Reisner.

Revision 1.143 / (download) - annotate - [select for diffs], Tue Nov 13 11:36:37 2018 UTC (5 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.142: +3 -1 lines
Diff to previous 1.142 (colored)

Initialize context property in alignment test handler function.

Revision 1.142 / (download) - annotate - [select for diffs], Mon Nov 12 14:18:10 2018 UTC (5 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.141: +4 -3 lines
Diff to previous 1.141 (colored)

Allow style #[] in mode formats.

Revision 1.141 / (download) - annotate - [select for diffs], Wed Oct 31 10:05:47 2018 UTC (5 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.140: +2 -3 lines
Diff to previous 1.140 (colored)

Reset all flags in screen_write_reset, reported by Benjamin Poirier.

Revision 1.140 / (download) - annotate - [select for diffs], Thu Oct 25 15:13:38 2018 UTC (5 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.139: +3 -3 lines
Diff to previous 1.139 (colored)

Add a "terminal" colour which can be used instead of "default" in style
options for the terminal default colour, bypassing any inheritance from
other options. Prompted by a discussion with abieber@.

Revision 1.139 / (download) - annotate - [select for diffs], Thu Oct 18 08:38:01 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.138: +98 -54 lines
Diff to previous 1.138 (colored)

Support for windows larger than visible on the attached client. This has
been a limitation for a long time.

There are two new options, window-size and default-size, and a new
command, resize-window. The force-width and force-height options and the
session_width and session_height formats have been removed.

The new window-size option tells tmux how to work out the size of
windows: largest means it picks the size of the largest session,
smallest the smallest session (similar to the old behaviour) and manual
means that it does not automatically resize windows. The default is
currently largest but this may change. aggressive-resize modifies the
choice of session for largest and smallest as it did before.

If a window is in a session attached to a client that is too small, only
part of the window is shown. tmux attempts to keep the cursor visible,
so the part of the window displayed is changed as the cursor moves (with
a small delay, to try and avoid excess redrawing when applications
redraw status lines or similar that are not currently visible). The
offset of the visible portion of the window is shown in status-right.

Drawing windows which are larger than the client is not as efficient as
those which fit, particularly when the cursor moves, so it is
recommended to avoid using this on slow machines or networks (set
window-size to smallest or manual).

The resize-window command can be used to resize a window manually. If it
is used, the window-size option is automatically set to manual for the
window (undo this with "setw -u window-size"). resize-window works in a
similar way to resize-pane (-U -D -L -R -x -y flags) but also has -a and
-A flags. -a sets the window to the size of the smallest client (what it
would be if window-size was smallest) and -A the largest.

For the same behaviour as force-width or force-height, use resize-window
-x or -y, and "setw -u window-size" to revert to automatic sizing..

If the global window-size option is set to manual, the default-size
option is used for new windows. If -x or -y is used with new-session,
that sets the default-size option for the new session.

The maximum size of a window is 10000x10000. But expect applications to
complain and much higher memory use if making a window excessively
big. The minimum size is the size required for the current layout
including borders.

The refresh-client command can be used to pan around a window, -U -D -L
-R moves up, down, left or right and -c returns to automatic cursor
tracking. The position is reset when the current window is changed.

Revision 1.138 / (download) - annotate - [select for diffs], Tue Jul 31 11:49:26 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.137: +2 -2 lines
Diff to previous 1.137 (colored)

Move struct screen_sel into screen.c and tidy up members that are only
used by copy mode.

Revision 1.137 / (download) - annotate - [select for diffs], Wed Jul 4 09:44:07 2018 UTC (5 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.136: +7 -7 lines
Diff to previous 1.136 (colored)

Add accessors for grid linedata member, for some future work. From Dan
Aloni.

Revision 1.136 / (download) - annotate - [select for diffs], Fri Jan 12 16:43:47 2018 UTC (6 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.135: +6 -4 lines
Diff to previous 1.135 (colored)

Do not collect top-bit-set characters in case they need to be replaced.

Revision 1.135 / (download) - annotate - [select for diffs], Wed Nov 15 19:21:24 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.134: +5 -2 lines
Diff to previous 1.134 (colored)

Completely rewrite the reflow code to correctly handle double width
characters (previously they were not accounted for).

Revision 1.134 / (download) - annotate - [select for diffs], Fri Nov 3 17:02:33 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.133: +3 -1 lines
Diff to previous 1.133 (colored)

Support mouse on preview in tree mode.

Revision 1.133 / (download) - annotate - [select for diffs], Thu Nov 2 22:00:42 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.132: +2 -2 lines
Diff to previous 1.132 (colored)

Make the mode draw function use the parent screen directly rather than
its own to avoid copying twice.

Revision 1.132 / (download) - annotate - [select for diffs], Thu Nov 2 21:29:17 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.131: +44 -13 lines
Diff to previous 1.131 (colored)

Add a "fast" version of screen_write_copy for tree mode that doesn't do
all the checks and selection and marking stuff needed for copy mode.

Revision 1.131 / (download) - annotate - [select for diffs], Thu Oct 5 08:12:24 2017 UTC (6 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.130: +24 -1 lines
Diff to previous 1.130 (colored)

When writing batches of characters to the screen, we need to clear
padding or later UTF-8 characters could be displayed incorrectly. GitHub
issue 1090.

Revision 1.130 / (download) - annotate - [select for diffs], Wed Aug 9 11:43:45 2017 UTC (6 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.129: +2 -2 lines
Diff to previous 1.129 (colored)

Add -F to choose-tree, choose-client, choose-buffer to specify the
format of each line, as well as adding a couple of formats needed for
the default display.

Revision 1.129 / (download) - annotate - [select for diffs], Fri Jun 30 22:24:08 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.128: +28 -3 lines
Diff to previous 1.128 (colored)

Try to show a better preview of sessions and windows in tree mode.

Revision 1.128 / (download) - annotate - [select for diffs], Mon Jun 12 10:57:35 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.127: +3 -1 lines
Diff to previous 1.127 (colored)

Need to flush out the linefeed after wrapper. GitHub issue 970.

Revision 1.127 / (download) - annotate - [select for diffs], Sun Jun 4 08:02:20 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.126: +2 -2 lines
Diff to previous 1.126 (colored)

Typo/style; plus man page escaping from jmc.

Revision 1.126 / (download) - annotate - [select for diffs], Wed May 31 17:56:48 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.125: +2 -2 lines
Diff to previous 1.125 (colored)

Style and spacing nits.

Revision 1.125 / (download) - annotate - [select for diffs], Tue May 30 21:44:59 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.124: +119 -1 lines
Diff to previous 1.124 (colored)

Rewrite of choose mode, both to simplify and tidy the code and to add
some modern features.

Now the common code is in mode-tree.c, which provides an API used by the
three modes now separated into window-{buffer,client,tree}.c. Buffer
mode shows buffers, client mode clients and tree mode a tree of
sessions, windows and panes.

Each mode has a common set of key bindings plus a few that are specific
to the mode. Other changes are:

- each mode has a preview pane: for buffers this is the buffer content
  (very useful), for others it is a preview of the pane;

- items may be sorted in different ways ('O' key);

- multiple items may be tagged and an operation applied to all of them
  (for example, to delete multiple buffers at once);

- in tree mode a command may be run on the selected item (session,
  window, pane) or on tagged items (key ':');

- displayed items may be filtered in tree mode by using a format (this
  is used to implement find-window) (key 'f');

- the custom format (-F) for the display is no longer available;

- shortcut keys change from 0-9, a-z, A-Z which was always a bit weird
  with keys used for other uses to 0-9, M-a to M-z.

Now that the code is simpler, other improvements will come later.

Primary key bindings for each mode are documented under the commands in
the man page (choose-buffer, choose-client, choose-tree).

Parts written by Thomas Adam.

Revision 1.124 / (download) - annotate - [select for diffs], Fri May 12 14:56:56 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.123: +2 -2 lines
Diff to previous 1.123 (colored)

Need to store bg for ECH.

Revision 1.123 / (download) - annotate - [select for diffs], Fri May 12 13:29:05 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.122: +3 -1 lines
Diff to previous 1.122 (colored)

Need to clear tty context before using it.

Revision 1.122 / (download) - annotate - [select for diffs], Fri May 12 13:00:56 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.121: +26 -9 lines
Diff to previous 1.121 (colored)

Scrolling needs to use background colour.

Revision 1.121 / (download) - annotate - [select for diffs], Fri May 12 10:50:11 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.120: +3 -2 lines
Diff to previous 1.120 (colored)

ECH needs to use background colour.

Revision 1.120 / (download) - annotate - [select for diffs], Thu May 11 11:39:30 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

Clear to start of screen needs to use background colour.

Revision 1.119 / (download) - annotate - [select for diffs], Sat Apr 29 21:27:46 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.118: +3 -3 lines
Diff to previous 1.118 (colored)

Fix UTF-8 combining characters in column 0, based on a diff from Keith
Winstein.

Revision 1.118 / (download) - annotate - [select for diffs], Tue Apr 25 18:30:29 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.117: +6 -2 lines
Diff to previous 1.117 (colored)

Make full width panes try to play more nicely with terminal copy and
paste by avoiding explicit line wraps if we think the terminal will wrap
anyway.

Revision 1.117 / (download) - annotate - [select for diffs], Sat Apr 22 10:30:56 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.116: +2 -2 lines
Diff to previous 1.116 (colored)

Can't collect UTF-8 characters of more than one byte at the moment.

Revision 1.116 / (download) - annotate - [select for diffs], Tue Mar 7 13:48:28 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.115: +13 -6 lines
Diff to previous 1.115 (colored)

Need to flush before writing out cells we are not collecting, also add
some extra logging.

Revision 1.115 / (download) - annotate - [select for diffs], Mon Mar 6 09:02:36 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.114: +4 -2 lines
Diff to previous 1.114 (colored)

When redrawing a combined UTF-8 characters in its existing position,
need to save and restore the cursor so that the next character goes into
the right place.

Revision 1.114 / (download) - annotate - [select for diffs], Tue Feb 21 10:30:15 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.113: +12 -6 lines
Diff to previous 1.113 (colored)

Scrolling at least needs to be flushed before sending EL to the terminal
(but it is simpler to flush everything, so do that instead).

Revision 1.113 / (download) - annotate - [select for diffs], Thu Feb 16 12:43:08 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.112: +2 -1 lines
Diff to previous 1.112 (colored)

Handle insert cells when cursor at edge of screen correctly, and do a
full flush before insert.

Revision 1.112 / (download) - annotate - [select for diffs], Thu Feb 9 10:09:14 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.111: +5 -4 lines
Diff to previous 1.111 (colored)

Combining characters need a full flush.

Revision 1.111 / (download) - annotate - [select for diffs], Thu Feb 9 09:33:15 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.110: +22 -18 lines
Diff to previous 1.110 (colored)

When an ordinary (not collected) cell is received, we need to flush any
delayed scrolling before drawing it.

Revision 1.110 / (download) - annotate - [select for diffs], Wed Feb 8 17:31:09 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.109: +36 -5 lines
Diff to previous 1.109 (colored)

Add support for scroll up escape sequence (CSI S) and use it when
possible instead of sending individual line feeds.

Revision 1.109 / (download) - annotate - [select for diffs], Wed Feb 8 16:45:18 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.108: +246 -177 lines
Diff to previous 1.108 (colored)

Collect sequences of printable ASCII characters and process them
together instead of handling them one by one. This is significantly
faster. Sequences are terminated when we reach the end of the line, fill
the internal buffer, or a different character is seen by the input
parser (an escape sequence, or UTF-8).

Rather than writing collected sequences out immediately, hold them until
it is necessary (another screen modification, or we consume all
available data). This means we can discard changes that would have no
effect (for example, lines that would just be scrolled off the screen or
cleared). This reduces the total amount of data we write out to the
terminal - not important for fast terminals, but a big help with slow
(like xterm).

Revision 1.108 / (download) - annotate - [select for diffs], Wed Feb 8 15:49:29 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.107: +11 -14 lines
Diff to previous 1.107 (colored)

Some other tidying bits.

Revision 1.107 / (download) - annotate - [select for diffs], Wed Feb 8 15:41:41 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.106: +37 -34 lines
Diff to previous 1.106 (colored)

Add a helper to store a cell, and some tidying.

Revision 1.106 / (download) - annotate - [select for diffs], Wed Feb 8 08:50:10 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.105: +19 -50 lines
Diff to previous 1.105 (colored)

Trying to avoid the occasional newline by saving the last cell on screen
is not actually helping us much and just adds complexity, so don't
bother.

Revision 1.105 / (download) - annotate - [select for diffs], Mon Feb 6 19:26:49 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.104: +6 -5 lines
Diff to previous 1.104 (colored)

Add BCE for clear to start of screen, which was somehow missed.

Revision 1.104 / (download) - annotate - [select for diffs], Mon Feb 6 13:23:00 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.103: +27 -13 lines
Diff to previous 1.103 (colored)

Only redraw the modified character when adding combining characters, not
the whole line.

Revision 1.103 / (download) - annotate - [select for diffs], Thu Jan 12 00:19:32 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.102: +2 -2 lines
Diff to previous 1.102 (colored)

Fix setting the palette of aixterm colours (90-97).

Revision 1.102 / (download) - annotate - [select for diffs], Thu Jan 5 09:07:16 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.101: +12 -3 lines
Diff to previous 1.101 (colored)

Highlight all occurrences of search string after searching in copy mode.

Revision 1.101 / (download) - annotate - [select for diffs], Fri Dec 9 21:39:27 2016 UTC (7 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.100: +4 -4 lines
Diff to previous 1.100 (colored)

Spacing nits.

Revision 1.100 / (download) - annotate - [select for diffs], Tue Oct 18 08:39:18 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.99: +2 -1 lines
Diff to previous 1.99 (colored)

Zero dirty count after flushing.

Revision 1.99 / (download) - annotate - [select for diffs], Thu Oct 13 20:27:27 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.98: +60 -43 lines
Diff to previous 1.98 (colored)

Add support for BCE (background colour erase). This makes various escape
sequences (notable EL and ED but also IL, DL, ICH, DCH) create blank
cells using the current background colour rather than the default
colour.

On modern systems BCE doesn't really have many benefits, but most other
terminals now support it, some (lazy) applications rely on it, and it is
not hard to include now that we have pane background colours anyway.

Mostly written by Sean Haugh.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Oct 12 15:43:51 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.97: +8 -6 lines
Diff to previous 1.97 (colored)

Fix a couple of problems with insert mode: flush dirty cells before we
modify the screen, not after; and use grid_view_insert_cells to make
space not grid_move_cells.

Revision 1.97 / (download) - annotate - [select for diffs], Wed Oct 12 13:24:07 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.96: +2 -6 lines
Diff to previous 1.96 (colored)

Redraw selection in tty_draw_line, so it appears when redrawing whole
pane. Reported by Theo Buehler.

Revision 1.96 / (download) - annotate - [select for diffs], Wed Oct 5 22:00:29 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.95: +8 -28 lines
Diff to previous 1.95 (colored)

screen_write_copy tried to be clever and clear the line if it reached
the end of the source, but it was wrong and causes problems that are
only showing up now we are more aggressive about skipping redundant
screen updates. Remove the optimization entirely as more trouble than it
is worth to fix (and it'll have to go when BCE is done anyway).

Revision 1.95 / (download) - annotate - [select for diffs], Wed Oct 5 12:36:36 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.94: +12 -8 lines
Diff to previous 1.94 (colored)

Wrap some long lines in screen-write.c.

Revision 1.94 / (download) - annotate - [select for diffs], Thu Sep 29 08:50:43 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.93: +4 -4 lines
Diff to previous 1.93 (colored)

Check padding when writing any character with width > 1, in case they
overlap after the first character (for example with cells xy and ab, y
is replacing a).

Revision 1.93 / (download) - annotate - [select for diffs], Fri Sep 2 20:57:20 2016 UTC (7 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored)

Remember the number of lines scrolled into the history (versus cleared
into the history) and when resizing only use scrolled lines and not
cleared lines (which are probably not intended to reappear). From
Chaoren Lin.

Revision 1.92 / (download) - annotate - [select for diffs], Fri Jul 15 00:49:08 2016 UTC (7 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.91: +218 -62 lines
Diff to previous 1.91 (colored)

Don't update cells in each block of data read from a pane immediately,
instead track them as change (dirty) and update them once at the end,
saves much time if repeatedly writing the same cell. Also fix comparison
of cells being equal in a few places (memcmp is not enough).

Revision 1.91 / (download) - annotate - [select for diffs], Fri Jul 15 00:42:56 2016 UTC (7 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.90: +2 -6 lines
Diff to previous 1.90 (colored)

Instead of representing colours in several different forms with various
cell flags, convert to use an int with flags marking 256 or RGB colours
in the top byte (except in cells, which we don't want to make any
bigger). From Brad Town.

Revision 1.90 / (download) - annotate - [select for diffs], Mon Jun 6 07:28:52 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.89: +14 -8 lines
Diff to previous 1.89 (colored)

Cache selected state so that cells going from selected to unselected are not
skipped, reported by Omar Sandoval.

Revision 1.89 / (download) - annotate - [select for diffs], Mon May 30 09:32:24 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.88: +54 -25 lines
Diff to previous 1.88 (colored)

Do not draw character to screen if it has not changed, and do not save
last character if it won't be used. This (and last few commits) prompted
by a report from Hubert depesz Lubaczewski.

Revision 1.88 / (download) - annotate - [select for diffs], Fri May 27 23:06:12 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.87: +6 -5 lines
Diff to previous 1.87 (colored)

Padding cell is always the same so use a static.

Revision 1.87 / (download) - annotate - [select for diffs], Fri May 27 23:02:17 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.86: +45 -38 lines
Diff to previous 1.86 (colored)

Break the save-last-cell code into a separate function (so it can be
called conditionally later).

Revision 1.86 / (download) - annotate - [select for diffs], Fri Apr 29 13:21:33 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.85: +51 -51 lines
Diff to previous 1.85 (colored)

Make the grid_cell passed into screen_write_* const.

Revision 1.85 / (download) - annotate - [select for diffs], Sun Jan 31 14:11:49 2016 UTC (8 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.84: +4 -2 lines
Diff to previous 1.84 (colored)

Clear RGB flags during selection.

Revision 1.84 / (download) - annotate - [select for diffs], Tue Jan 19 15:59:12 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.83 / (download) - annotate - [select for diffs], Fri Dec 11 16:37:21 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.82: +7 -7 lines
Diff to previous 1.82 (colored)

Style nits and line wrapping of function declarations.

Revision 1.82 / (download) - annotate - [select for diffs], Mon Nov 23 23:47:57 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored)

Partly revert previous, it is harmless to keep support for UTF-8 mouse
mode inside tmux, just no longer support it for tmux itself.

Revision 1.81 / (download) - annotate - [select for diffs], Mon Nov 23 20:53:09 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.80: +2 -2 lines
Diff to previous 1.80 (colored)

Remove support for the UTF-8 mouse extension. This was a briefly used,
poor idea that was fairly quickly replaced by SGR mouse input (which is
now widespread). It is impossible to tell the difference between UTF-8
and non-UTF-8 mouse input; since the mouse-utf8 option was removed tmux
has not handled it correctly in any case; and it is ridiculous to have
three different forms of mouse input.

Revision 1.80 / (download) - annotate - [select for diffs], Wed Nov 18 14:27:44 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored)

Use __unused rather than rolling our own.

Revision 1.79 / (download) - annotate - [select for diffs], Sat Nov 14 11:45:43 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.78: +13 -13 lines
Diff to previous 1.78 (colored)

All these return values from utf8_* are confusing, use an enum.

Revision 1.78 / (download) - annotate - [select for diffs], Sat Nov 14 10:56:31 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.77: +33 -25 lines
Diff to previous 1.77 (colored)

Be more strict about invalid UTF-8.

Revision 1.77 / (download) - annotate - [select for diffs], Fri Nov 13 08:09:28 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.76: +43 -51 lines
Diff to previous 1.76 (colored)

Long overdue change to the way we store cells in the grid: now, instead
of storing a full grid_cell with UTF-8 data and everything, store a new
type grid_cell_entry. This can either be the cell itself (for ASCII
cells), or an offset into an extended array (per line) for UTF-8
data.

This avoid a large (8 byte) overhead on non-UTF-8 cells (by far the
majority for most users) without the complexity of the shadow array we
had before. Grid memory without any UTF-8 is about half.

The disadvantage that cells can no longer be modified in place and need
to be copied out of the grid and back but it turned out to be lot less
complicated than I expected.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Nov 12 22:04:37 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.75: +20 -20 lines
Diff to previous 1.75 (colored)

Rename overly-long utf8data to ud throughout.

Revision 1.75 / (download) - annotate - [select for diffs], Thu Nov 12 11:09:11 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.74: +20 -17 lines
Diff to previous 1.74 (colored)

Nuke the utf8 and status-utf8 options and make tmux only a UTF-8
terminal. We still support non-UTF-8 terminals outside tmux, but inside
it is always UTF-8 (as when the utf8 and status-utf8 options were on).

Revision 1.74 / (download) - annotate - [select for diffs], Mon Sep 14 13:22:02 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.73: +1 -2 lines
Diff to previous 1.73 (colored)

Remove some extra blank lines.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Jul 13 13:28:50 2015 UTC (8 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.72: +3 -1 lines
Diff to previous 1.72 (colored)

Revert to marking lines as wrapped on newlines, fixes problems with
capturep -J.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Nov 8 12:58:31 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.71: +1 -3 lines
Diff to previous 1.71 (colored)

Two improvements to reflow from Balazs Kezes:

- Don't extend the line to full width on insert/delete character which
  means leaves extra spaces when reflowing.

- Only mark a line wrapped when the cursor actually goes off the end,
  not on newlines which can be used for positioning.

Revision 1.71 / (download) - annotate - [select for diffs], Mon Oct 20 23:57:14 2014 UTC (9 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.70: +14 -14 lines
Diff to previous 1.70 (colored)

Better format for printf format attributes.

Revision 1.70 / (download) - annotate - [select for diffs], Thu Oct 2 08:36:26 2014 UTC (9 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.69: +3 -1 lines
Diff to previous 1.69 (colored)

Copy ACS characters as UTF-8, from Balazs Kezes.

Revision 1.69 / (download) - annotate - [select for diffs], Thu Apr 17 14:45:49 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.68: +3 -2 lines
Diff to previous 1.68 (colored)

Some more long lines.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Jan 28 23:07:09 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.67: +2 -85 lines
Diff to previous 1.67 (colored)

Allow replacing each of the many sets of separate foo-{fg,bg,attr}
options with a single foo-style option. For example:

    set -g status-fg yellow
    set -g status-bg red
    set -g status-attr blink

Becomes:

    set -g status-style fg=yellow,bg=red,blink

The -a flag to set can be used to add to rather than replace a style. So:

    set -g status-bg red

Becomes:

    set -ag status-style bg=red

Currently this is fully backwards compatible (all *-{fg,bg,attr} options
remain) but the plan is to deprecate them over time.

From Tiago Cunha.

Revision 1.67 / (download) - annotate - [select for diffs], Wed May 15 15:32:14 2013 UTC (11 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)

RIS should reset focus reporting, from Hayaki Saito.

Revision 1.66 / (download) - annotate - [select for diffs], Wed Mar 27 11:19:19 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.65: +5 -1 lines
Diff to previous 1.65 (colored)

Move the cursor back into the last column on CUU/CUD to match xterm
behaviour. From George Nachman.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Mar 22 10:41:01 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.64: +2 -2 lines
Diff to previous 1.64 (colored)

Unbreak line wrapping.

Revision 1.64 / (download) - annotate - [select for diffs], Fri Mar 22 10:36:54 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.63: +16 -9 lines
Diff to previous 1.63 (colored)

Implement DECAWM (SM/RM 7) using existing MODE_WRAP flag.

Revision 1.63 / (download) - annotate - [select for diffs], Fri Mar 22 10:33:50 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.62: +4 -2 lines
Diff to previous 1.62 (colored)

Support the latest theory for mouse input, this is enabled/disabled with
SM/RM 1006 and is similar in style to SGR input: \033[<b;x;yM or
\033[b;x;ym. From Egmont Koblinger.

Revision 1.62 / (download) - annotate - [select for diffs], Fri Mar 22 10:31:22 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.61: +1 -2 lines
Diff to previous 1.61 (colored)

No more lint means no more ARGSUSED.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Mar 21 18:47:56 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.60: +23 -99 lines
Diff to previous 1.60 (colored)

Instead of loads of little screen_write_*_on and off functions which
just change mode flags, just have screen_write_mode_set and
screen_write_mode_clear.

Revision 1.60 / (download) - annotate - [select for diffs], Fri Jan 18 02:16:21 2013 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.59: +33 -77 lines
Diff to previous 1.59 (colored)

Rather than having two grids for each pane, one for ASCII and one for
UTF-8, collapse the two together. Simplifies the code at the expense of
more memory (which can probably be reduced again later).

Revision 1.59 / (download) - annotate - [select for diffs], Tue Jan 15 23:18:55 2013 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.58: +25 -1 lines
Diff to previous 1.58 (colored)

Implement ECH (erase character, CSI X). Reported by Christian Neukirchen.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Dec 8 17:05:57 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.57: +12 -3 lines
Diff to previous 1.57 (colored)

Handle resetting 256-colours properly when parsing #[default],
#[fg=default] and #[bg=default] styles.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Sep 24 12:53:55 2012 UTC (11 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.56: +7 -3 lines
Diff to previous 1.56 (colored)

Use ACS characters for choose-tree arrows based on diff from Romain
Francoise.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jul 10 11:53:01 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.55: +7 -6 lines
Diff to previous 1.55 (colored)

xfree is not particularly helpful, remove it. From Thomas Adam.

Revision 1.55 / (download) - annotate - [select for diffs], Sat Mar 17 17:36:03 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.54: +5 -5 lines
Diff to previous 1.54 (colored)

Revert screen-write.c r1.54 and fix the bug properly. After wrapping a
line in a pane, the cursor needs to move to the next line unless it
scrolled.

Revision 1.54 / (download) - annotate - [select for diffs], Wed Mar 14 23:29:07 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.53: +4 -4 lines
Diff to previous 1.53 (colored)

Store context off before moving the cursor when wrapping, to fix long
standing bug drawing over the status line.

Revision 1.53 / (download) - annotate - [select for diffs], Sat Mar 3 09:43:22 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.52: +13 -1 lines
Diff to previous 1.52 (colored)

Support "bracketed paste" mode. This adds a -p flag to paste-buffer - if
this is used and the application has requested bracketed pastes, then
tmux surrounds the pasted text by \033[200~ and \033[201~. Applications
like vim can (apparently) use this to avoid, for example, indenting the
text. From Ailin Nemui.

Revision 1.52 / (download) - annotate - [select for diffs], Sat Jan 21 08:10:21 2012 UTC (12 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.51: +19 -1 lines
Diff to previous 1.51 (colored)

Add a -R flag to send-keys to reset the terminal. Written ages ago and
Suggested by someone, I forget who.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Oct 23 10:16:14 2011 UTC (12 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.50: +12 -1 lines
Diff to previous 1.50 (colored)

Support for \e[3J to clear the history. Also send the corresponding
terminfo code (E3) before locking.

Revision 1.50 / (download) - annotate - [select for diffs], Wed May 18 20:24:29 2011 UTC (13 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.49: +13 -1 lines
Diff to previous 1.49 (colored)

Support setting the xterm clipboard when copying from copy mode using
the xterm escape sequence for the purpose (if xterm is configured to
allow it).

Written by and much discussed Ailin Nemui, guidance on
xterm/termcap/terminfo from Thomas Dickey.

Revision 1.49 / (download) - annotate - [select for diffs], Sun Apr 17 19:21:19 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored)

Fix character position check, from Tiago Resende.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Mar 26 19:07:33 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.47: +7 -5 lines
Diff to previous 1.47 (colored)

Fix to properly wrap wide characters, from Micah Cowan.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Mar 7 23:46:27 2011 UTC (13 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.46: +13 -1 lines
Diff to previous 1.46 (colored)

Support passing through escape sequences to the underlying terminal by
using DCS with a "tmux;" prefix. Escape characters in the sequences must
be doubled. For example:

$ printf '\033Ptmux;\033\033]12;red\007\033\\'

Will pass \033]12;red\007 to the terminal (and change the cursor colour
in xterm). From Kevin Goodsell.

Revision 1.46 / (download) - annotate - [select for diffs], Tue Jan 25 23:40:26 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.45: +16 -5 lines
Diff to previous 1.45 (colored)

When clearing the entire screen, clear lines that are used into the
history like xterm does. Requested ages ago by someone I've forgotten.

Revision 1.45 / (download) - annotate - [select for diffs], Mon Jan 3 23:35:21 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.44: +13 -1 lines
Diff to previous 1.44 (colored)

Support for UTF-8 mouse input (\033[1005h). This was added in xterm 262
and supports larger terminals than the older way.

If the new mouse-utf8 option is on, UTF-8 mouse input is enabled for all
UTF-8 terminals. The option defaults to on if LANG etc are set in the
same manner as the utf8 option.

With help and based on code from hsim at gmx.li.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Dec 29 21:49:06 2010 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.43: +14 -7 lines
Diff to previous 1.43 (colored)

Support all four of the xterm mouse modes. Based on a diff from hsim at
gmx.li.

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jun 21 00:11:12 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.42: +15 -29 lines
Diff to previous 1.42 (colored)

Ensure we overwrite UTF-8 wide characters properly, and never overwrite
characters we weren't overlapping.  Fixes "disappearing wide characters"
glitch. From Micah Cowan.

Revision 1.42 / (download) - annotate - [select for diffs], Tue Apr 6 21:35:44 2010 UTC (14 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.41: +4 -3 lines
Diff to previous 1.41 (colored)

Merge copy mode and output mode, dropping the latter. Idea and code from
Micah Cowan.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Dec 3 22:50:10 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.40: +8 -8 lines
Diff to previous 1.40 (colored)

Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last
time now I've configured emacs to make them displayed in really annoying
colours...

Revision 1.40 / (download) - annotate - [select for diffs], Thu Nov 26 21:37:13 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.39: +2 -1 lines
Diff to previous 1.39 (colored)

Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to
the rest to reduce lint output.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Nov 18 17:02:17 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.38: +27 -41 lines
Diff to previous 1.38 (colored)

Cleanup by moving various (mostly horrible) little bits handling UTF-8 grid
data into functions in a new file, grid-utf8.c, and use sizeof intead of
UTF8_DATA.

Also nuke trailing whitespace from tmux.1, reminded by jmc.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Nov 16 13:40:45 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

A screen can be one cell wide; don't crash if that is the case.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Nov 11 18:53:21 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.36: +12 -3 lines
Diff to previous 1.36 (colored)

Add an explicit zero-length check for UTF-8 input data, prompted by a report
from parfait via deraadt.

While here, add a statement to set the width when filling with _s if not enough
space (width should never be high enough at the moment anyway), and wrap some
long lines.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Oct 20 19:18:28 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.35: +83 -104 lines
Diff to previous 1.35 (colored)

Try to reduce the UTF-8 mess.

Get rid of passing around u_char[4]s and define a struct utf8_data which has
character data, size (sequence length) and width. Move UTF-8 character
collection into two functions utf8_open/utf8_append in utf8.c which fill in
this struct and use these functions from input.c and the various functions in
screen-write.c.

Space for rather more data than is necessary for one UTF-8 sequence is in the
utf8_data struct because screen_write_copy is still nasty and needs to reinject
the character (after combining) into screen_write_cell.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Oct 20 17:33:33 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.34: +67 -29 lines
Diff to previous 1.34 (colored)

UTF-8 combined character fixes.

Thai can have treble combinations (1 x width=1 then 2 x width=0) so bump the
UTF-8 cell data size to 9 and alter the code to allow this.

Also break off the combining code into a separate function, handle any further
combining beyond the buffer size by replacing the character with _s, and when
redrawing the UTF-8 character don't assume the first part has just been
printed, redraw the entire line.

Revision 1.34 / (download) - annotate - [select for diffs], Tue Oct 20 16:32:23 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.33: +8 -22 lines
Diff to previous 1.33 (colored)

Move the check for whether to force a line wrapper lower down into the tty code
where it has access to the tty width, which is what should have been checked.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Oct 17 08:35:38 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.32: +7 -7 lines
Diff to previous 1.32 (colored)

Always move the cursor position on !xenl terminals, since there is no invisible
last cursor position.

Also nuke an unused variable.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Oct 17 08:32:18 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.31: +9 -9 lines
Diff to previous 1.31 (colored)

Don't print wide characters at screen width - 1. Matches uterm behaviour and
is probably a better idea anyway.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Oct 17 08:24:46 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.30: +50 -22 lines
Diff to previous 1.30 (colored)

Instead of having a complicated check to see if the cursor is in the last
position to avoid an explicit wrap, actually move it there.

Some UTF-8 fixes to come.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Oct 12 17:19:47 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.29: +28 -8 lines
Diff to previous 1.29 (colored)

When drawing lines that have wrapped naturally, don't force a newline but
permit them to wrap naturally again. This allows terminals that use this to
guess where lines start and end for eg mouse selecting (like xterm) to work
correctly.

This was another long-standing issue raised by several people over the last
while.

Thanks to martynas@ for much testing. This was not trivial to get right so
bringing it in for wider testing and adn to fix any further glitches in-tree.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Oct 12 16:59:55 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.28: +21 -1 lines
Diff to previous 1.28 (colored)

When backspace is received at the beginning of a line and the previous line was
wrapped, move the cursor back up to the end of the previous line.

Another one of the forgotten persons requested this quite a while ago (I need
to start noting names on todo items...) when it was quite hard to
implement. Now it is easy and I don't see it can do any harm, so hey presto...

Revision 1.28 / (download) - annotate - [select for diffs], Mon Oct 12 16:33:39 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.27: +5 -3 lines
Diff to previous 1.27 (colored)

Wrap a couple of long lines.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Oct 12 11:08:02 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.26: +5 -1 lines
Diff to previous 1.26 (colored)

Permit attributes to be turned off in #[] by prefixing with "no", for example
"noblink".

Revision 1.26 / (download) - annotate - [select for diffs], Tue Sep 15 15:14:09 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.25: +31 -14 lines
Diff to previous 1.25 (colored)

Stick line length to what is actually used (removing an optimization that
allowed it to be bigger), and use clear line/EOL sequences rather than spaces
in copy/scroll mode.

This fixes xterm copy/paste from tmux which treats trailing spaces differently
from clearing a line with the escape sequences. Reported by martynas@.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Sep 10 17:16:24 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.24: +21 -8 lines
Diff to previous 1.24 (colored)

Permit options such as status-bg to be configured using the entire 256 colour
palette by setting "colour0" to "colour255".

Revision 1.24 / (download) - annotate - [select for diffs], Mon Sep 7 10:49:32 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.23: +173 -1 lines
Diff to previous 1.23 (colored)

Permit embedded colour and attributes in status-left and status-right using new
#[] special characters, for example #[fg=red,bg=blue,blink].

Revision 1.23 / (download) - annotate - [select for diffs], Fri Aug 21 08:12:05 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.22: +1 -4 lines
Diff to previous 1.22 (colored)

Ugh, committed the wrong version of this change and got both solutions rather
than just the second. Remove unused assignment.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Aug 20 19:14:42 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.21: +16 -12 lines
Diff to previous 1.21 (colored)

A few trivial optimisations: no need to check for zero size if calling
buffer_ensure in buffer.c; expand grid lines by a greater increase than one
each time; and don't read UTF-8 data unless it actually needs to be checked
when overwriting a cell.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Aug 13 16:24:33 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.20: +10 -10 lines
Diff to previous 1.20 (colored)

It was originally intended that scroll mode would show content that was
currently off-screen due to resize, but somewhere along the way this got
lost. Restore this behaviour to scroll mode by fixing screen_write_copy to read
up to the saved line length rather than the current screen width. Copy mode
remains unaltered for now.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Aug 8 15:57:49 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.19: +13 -6 lines
Diff to previous 1.19 (colored)

Add a flags member to the grid_line struct and use it to differentiate lines
wrapped at the screen edge from those terminated by a newline. Then use this
when copying to combine wrapped lines together into one.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Jul 30 20:41:48 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.18: +2 -1 lines
Diff to previous 1.18 (colored)

Plug some memory leaks.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jul 27 11:33:21 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.17: +13 -11 lines
Diff to previous 1.17 (colored)

Draw UTF-8 characters under the selection correctly.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Jul 22 20:53:38 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.16: +68 -42 lines
Diff to previous 1.16 (colored)

More tty code tidying: move the saved cursor/region position (from before the
screen was updated) out of struct screen and into struct tty_ctx.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jul 22 18:02:23 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.15: +20 -20 lines
Diff to previous 1.15 (colored)

enum tty_cmd is only used as an index into the array of command function
pointers, so remove it and use the function pointers directly to represent
themselves.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jul 22 16:45:31 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.14: +27 -21 lines
Diff to previous 1.14 (colored)

There are relatively few arguments to tty_cmd_* functions now, so tidy them up
by using a struct rather than hiding everything with varargs.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jul 22 15:55:32 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.13: +2 -7 lines
Diff to previous 1.13 (colored)

tty_cmd_raw is only used once, for raw UTF-8 output, so rename it to
tty_cmd_utf8character and eliminate the size argument.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jul 14 14:47:32 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

The scroll region cannot be one line only, ignore attempts to make it so.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Jul 9 17:57:11 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.11: +19 -5 lines
Diff to previous 1.11 (colored)

Cursor up and down should be limited by the scroll region (cuu should stop at
the scroll region top if starting from below it and cud stop at the bottom if
starting from above). Fixes another vttest test.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jul 9 07:58:14 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.10: +34 -6 lines
Diff to previous 1.10 (colored)

Change inserting and deleting lines inside the scroll region to properly clear
lines that should be inserted/deleted but not moved. Fixes problems with mutt
reported by Brian Lewis, thanks.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jul 9 00:29:32 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.9: +5 -9 lines
Diff to previous 1.9 (colored)

Tidy by removing unused argument from grid_view_{insert,delete}_line_region
functions (currently don't fully work, this is to make fix easier).

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jun 29 21:30:50 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.8: +9 -9 lines
Diff to previous 1.8 (colored)

Fix two errors with character/line insertion and deletion: the maximum number
of characters which may be inserted or deleted is the screen width, not one
less (and similarly for lines and height); and if characters or lines are
deleted by moving the ones that follow, the space at the end needs to be
cleared.

This appears to solve long-standing redraw issues most visible when using the
force-width option then scrolling in view(1) or unwrapping lines in emacs.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jun 26 15:13:39 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Status line fixes: don't truncate status-right now the length calculation is
done for UTF-8, limit to the maximum length correctly when printing, and always
print a space even if the left string is longer than the width available.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jun 5 03:13:16 2009 UTC (14 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.6: +5 -5 lines
Diff to previous 1.6 (colored)

Remove trailing newlines, spaces, and tabs.

No binary change.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jun 3 23:37:30 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.5: +11 -1 lines
Diff to previous 1.5 (colored)

Support insert mode by using insert character to shift the cells before writing
as normal.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jun 3 23:30:40 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.4: +26 -1 lines
Diff to previous 1.4 (colored)

Implement the DEC alignment test. With the last change this is enough for the
first cursor test in vttest (in ports) to pass; it still shops a few more
problems though.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jun 3 23:26:56 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

Fix some miscalculations when clearing to start of screen: the number of lines
to the cursor is cy not cy - 1, and the current cursor cell should be included.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 3 16:54:26 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.2: +12 -12 lines
Diff to previous 1.2 (colored)

New session option, status-utf8, to control the interpretation of top-bit-set
characters in status-left and status-right (if on, they are treated as UTF-8;
otherwise passed through).

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 3 16:05:46 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1: +111 -5 lines
Diff to previous 1.1 (colored)

Add a UTF-8 aware string length function and make UTF-8 in
status-left/status-right work properly. At the moment any top-bit-set
characters are assumed to be UTF-8: a status-utf8 option to configure this will
come shortly.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jun 1 22:58:49 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN

Import tmux, a terminal multiplexor allowing (among other things) a single
terminal to be switched between several different windows and programs
displayed on one terminal be detached from one terminal and moved to another.

ok deraadt pirofti

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.