OpenBSD CVS

CVS log for src/usr.bin/tmux/grid-view.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.36 / (download) - annotate - [select for diffs], Wed Sep 28 07:55:29 2022 UTC (19 months, 3 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

Add a -T flag to capture-pane to stop at the last used cell instead of
the full width. Restore the previous behaviour by making it default to
off unless -J is used (the only time it matters). Fixes mosh unit tests;
GitHub issue 3339.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Jul 6 07:36:36 2022 UTC (22 months, 1 week ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

Support hyperlinks with capture-pane -e and add a mouse_hyperlink
format, GitHub issue 3247 from Jeff Chiang.

Revision 1.34 / (download) - annotate - [select for diffs], Tue Jun 2 20:51:46 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.33: +8 -1 lines
Diff to previous 1.33 (colored)

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

Revision 1.33 / (download) - annotate - [select for diffs], Fri Aug 16 08:52:25 2019 UTC (4 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.32: +2 -1 lines
Diff to previous 1.32 (colored)

grid_view_delete_cells does need to clear, GitHub issue 1871.

Revision 1.32 / (download) - annotate - [select for diffs], Tue Jul 16 10:30:56 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.31: +1 -2 lines
Diff to previous 1.31 (colored)

Fix grid clear code to correctly clear with the default background
colour rather than ending up with the used count higher than the total
size, GitHub issue 1829.

Revision 1.31 / (download) - annotate - [select for diffs], Wed Jul 4 09:44:07 2018 UTC (5 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

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

Revision 1.30 / (download) - annotate - [select for diffs], Wed Aug 30 18:13:47 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

Instead of overloading the line clear function to mean free if
background is default (8), introduce an explicit free function and use
it where a free alone is needed. Likewise, use memmove directly rather
than grid_move_lines where it makes sense. Based on a memory leak fix by
Dan Aloni in GitHub issue 1051.

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

Scrolling needs to use background colour.

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

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

Revision 1.27 / (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.26: +10 -1 lines
Diff to previous 1.26 (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.26 / (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.25: +34 -29 lines
Diff to previous 1.25 (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.25 / (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.24: +2 -1 lines
Diff to previous 1.24 (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.24 / (download) - annotate - [select for diffs], Tue Jan 19 15:59:12 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Nov 13 12:18:52 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

Two spacing and spelling nits.

Revision 1.22 / (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.21: +7 -14 lines
Diff to previous 1.21 (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.21 / (download) - annotate - [select for diffs], Tue Jan 6 21:14:42 2015 UTC (9 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.20: +3 -8 lines
Diff to previous 1.20 (colored)

Revert to r1.16 since this is still clearly broken and I can't see how
right now.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Dec 1 22:22:14 2014 UTC (9 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.19: +5 -4 lines
Diff to previous 1.19 (colored)

Another fix for insertion from Balazs Kezes. On insertion, size the line
just enough for the inserted characters.

Revision 1.19 / (download) - annotate - [select for diffs], Wed Nov 12 22:59:45 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.18: +7 -3 lines
Diff to previous 1.18 (colored)

Restore change in r1.17 but add checks to prevent the line length
overflowing, from Balazs Kezes.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Nov 10 19:53:32 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

Revert r1.17 as it breaks inserting in some cases.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Nov 8 12:58:31 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (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.16 / (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.15: +5 -3 lines
Diff to previous 1.15 (colored)

Some more long lines.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Mar 31 21:42:27 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.14: +1 -23 lines
Diff to previous 1.14 (colored)

GRID_DEBUG is no longer needed.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Mar 25 10:05:35 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

Preserve trailing spaces with capture-pane -J, from George Nachman.

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

Add -C and -J to capture pane to escape control sequences and to join
wrapped line, based on a diff from George Nachman.

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

Add -e flag to capture-pane to include embedded ANSI SGR escape
sequences, from George Nachman.

Revision 1.11 / (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.10: +2 -24 lines
Diff to previous 1.10 (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.10 / (download) - annotate - [select for diffs], Sun Jan 29 21:31:11 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.9: +4 -2 lines
Diff to previous 1.9 (colored)

Enforce history-limit option when clearing the screen, memory leak
spotted by R I Pienaar.

Revision 1.9 / (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_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.8: +25 -1 lines
Diff to previous 1.8 (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.8 / (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_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.7: +4 -4 lines
Diff to previous 1.7 (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.7 / (download) - annotate - [select for diffs], Tue Oct 13 15:38:37 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.6: +14 -9 lines
Diff to previous 1.6 (colored)

Move lines into the history when scrolling even if the scroll region is not
the entire screen.

Allows ircII users to see history, prompted by naddy.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Jul 13 10:43:52 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

Support "alternate screen" mode (terminfo smcup/rmcup) typically used by full
screen interactive programs to preserve the screen contents. When activated, it
saves a copy of the visible grid and disables scrolling into and resizing out
of the history; when deactivated the visible data is restored and the history
reenabled.

Revision 1.5 / (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.4: +12 -4 lines
Diff to previous 1.4 (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.4 / (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.3: +5 -9 lines
Diff to previous 1.3 (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.3 / (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.2: +5 -3 lines
Diff to previous 1.2 (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.2 / (download) - annotate - [select for diffs], Wed Jun 24 22:04:18 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.1: +13 -1 lines
Diff to previous 1.1 (colored)

Add a dedicated function to convert a line into a string and use it to simplify the search window function.

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.