OpenBSD CVS

CVS log for src/usr.bin/tmux/window-copy.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.350 / (download) - annotate - [select for diffs], Tue May 14 09:32:37 2024 UTC (5 days, 6 hours ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.349: +5 -18 lines
Diff to previous 1.349 (colored)

Revert part of the change for GitHub issue 3675 because it does not work
correctly, it was intended to skip lines that are already being searched
as part of a previous wrapped line but in fact is skipping all lines
except the last in wrapped lines.

Also revert the search-wrapped-lines option (I didn't realize it was
intended to work around this).

Revision 1.349 / (download) - annotate - [select for diffs], Tue May 14 07:40:39 2024 UTC (5 days, 8 hours ago) by nicm
Branch: MAIN
Changes since 1.348: +10 -4 lines
Diff to previous 1.348 (colored)

Add an option to disable unwrapping lines for searching, from
meanderingprogrammer at gmail dot com, GitHub issue 3975.

Revision 1.348 / (download) - annotate - [select for diffs], Tue Apr 23 13:34:51 2024 UTC (3 weeks, 5 days ago) by jsg
Branch: MAIN
Changes since 1.347: +2 -2 lines
Diff to previous 1.347 (colored)

correct indentation; no functional change
ok tb@

Revision 1.347 / (download) - annotate - [select for diffs], Tue Mar 26 10:20:20 2024 UTC (7 weeks, 5 days ago) by nicm
Branch: MAIN
Changes since 1.346: +2 -2 lines
Diff to previous 1.346 (colored)

Fix selection present check, reported by M Kelly.

Revision 1.346 / (download) - annotate - [select for diffs], Thu Mar 21 11:26:28 2024 UTC (8 weeks, 3 days ago) by nicm
Branch: MAIN
Changes since 1.345: +14 -6 lines
Diff to previous 1.345 (colored)

Do not consider a selection present if it is empty, from Michael Grant
(GitHub issue 3869). Also a typo fix from GitHub issue 3877.

Revision 1.345 / (download) - annotate - [select for diffs], Thu Nov 2 10:38:14 2023 UTC (6 months, 2 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.344: +2 -2 lines
Diff to previous 1.344 (colored)

next-prompt can have 1 argument.

Revision 1.344 / (download) - annotate - [select for diffs], Mon Sep 4 08:01:43 2023 UTC (8 months, 2 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.343: +19 -7 lines
Diff to previous 1.343 (colored)

Skip wrapped lines in top level search loop because they will be
combined in the inner loop (in window_copy_search_rl_regex and the
others), avoids searching the same text multiple times. Also add a line
length limit for regex searches. GitHub issue 3675.

Revision 1.343 / (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.342: +3 -5 lines
Diff to previous 1.342 (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.342 / (download) - annotate - [select for diffs], Tue Aug 8 08:21:30 2023 UTC (9 months, 1 week ago) by nicm
Branch: MAIN
Changes since 1.341: +17 -8 lines
Diff to previous 1.341 (colored)

Add flag to next-prompt/previous-prompt to go to command output instead,
from Magnus Gross.

Revision 1.341 / (download) - annotate - [select for diffs], Mon Jul 3 16:47:43 2023 UTC (10 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.340: +74 -1 lines
Diff to previous 1.340 (colored)

Add support for marking lines with a shell prompt based on the OSC 133
extension, from Munif Tanjim in GitHub issue 3596.

Revision 1.340 / (download) - annotate - [select for diffs], Wed Sep 28 07:59:50 2022 UTC (19 months, 3 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.339: +51 -7 lines
Diff to previous 1.339 (colored)

Add scroll-top and scroll-bottom commands to scroll so cursor is at top
or bottom. From Anindya Mukherjee, GitHub issue 3334.

Revision 1.339 / (download) - annotate - [select for diffs], Tue Aug 23 08:14:19 2022 UTC (20 months, 3 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.338: +33 -1 lines
Diff to previous 1.338 (colored)

Add scroll-middle copy mode command to make cursor line in the middle,
from Varun Kumar E in GitHub issue 3307.

Revision 1.338 / (download) - annotate - [select for diffs], Wed Aug 3 13:27:48 2022 UTC (21 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.337: +3 -1 lines
Diff to previous 1.337 (colored)

Do not crash when searching for .* with extremely long lines. Reported
by Torbjorn Lonnemark, GitHub issue 3272.

Revision 1.337 / (download) - annotate - [select for diffs], Fri Jul 22 07:14:07 2022 UTC (21 months, 4 weeks ago) by nicm
Branch: MAIN
Changes since 1.336: +3 -1 lines
Diff to previous 1.336 (colored)

Clear marks when the search string changes. From Anindya Mukherjee,
GitHub issue 3255.

Revision 1.336 / (download) - annotate - [select for diffs], Tue Jun 21 09:30:01 2022 UTC (22 months, 4 weeks ago) by nicm
Branch: MAIN
Changes since 1.335: +21 -14 lines
Diff to previous 1.335 (colored)

Store time lines are scrolled into history and display in copy mode.

Revision 1.335 / (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.334: +3 -3 lines
Diff to previous 1.334 (colored)

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

Revision 1.334 / (download) - annotate - [select for diffs], Mon May 30 13:00:19 2022 UTC (23 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.333: +51 -14 lines
Diff to previous 1.333 (colored)

Add a way for lines added to copy mode to be passed through the parser
to handle escape sequences and use it for run-shell, GitHub issue 3156.

Revision 1.333 / (download) - annotate - [select for diffs], Thu Feb 3 07:26:43 2022 UTC (2 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.332: +17 -1 lines
Diff to previous 1.332 (colored)

Add a key in copy mode to toggle position indicator.

Revision 1.332 / (download) - annotate - [select for diffs], Mon Dec 20 09:02:12 2021 UTC (2 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.331: +6 -1 lines
Diff to previous 1.331 (colored)

Do not crash on a zero size character.

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

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

Revision 1.330 / (download) - annotate - [select for diffs], Fri Aug 20 20:04:22 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.329: +2 -1 lines
Diff to previous 1.329 (colored)

Spacing tweaks.

Revision 1.329 / (download) - annotate - [select for diffs], Fri Aug 20 19:50:17 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.328: +87 -84 lines
Diff to previous 1.328 (colored)

Hide struct args behind a couple of accessor functions.

Revision 1.328 / (download) - annotate - [select for diffs], Fri Aug 20 19:08:36 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.327: +1 -2 lines
Diff to previous 1.327 (colored)

Remove some unnecessary blank lines.

Revision 1.327 / (download) - annotate - [select for diffs], Fri Aug 20 17:50:42 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.326: +4 -4 lines
Diff to previous 1.326 (colored)

Remove stray spaces after function names.

Revision 1.326 / (download) - annotate - [select for diffs], Wed Aug 11 20:35:46 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.325: +579 -229 lines
Diff to previous 1.325 (colored)

Add pipe variants of the line copy commands. While here make the command
list less unreadable. GitHub issue 2813.

Revision 1.325 / (download) - annotate - [select for diffs], Mon Aug 9 13:08:08 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.324: +79 -1 lines
Diff to previous 1.324 (colored)

Change copy-line and copy-end-of-line not to cancel and add -and-cancel
variants, like the other copy commands. GitHub issue 2799.

Revision 1.324 / (download) - annotate - [select for diffs], Thu Jun 10 07:58:42 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.323: +28 -11 lines
Diff to previous 1.323 (colored)

Fix rectangle selection, from Anindya Mukherjee, GitHub issue 2709.

Revision 1.323 / (download) - annotate - [select for diffs], Thu Jun 10 07:56:47 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.322: +56 -48 lines
Diff to previous 1.322 (colored)

More accurate vi(1) word navigation in copy mode and on the status line.
This changes the meaning of the word-separators option - setting it to
the empty string is equivalent to the previous behavior. From Will Noble
in GitHub issue 2693.

Revision 1.322 / (download) - annotate - [select for diffs], Mon Apr 5 08:43:48 2021 UTC (3 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.321: +19 -29 lines
Diff to previous 1.321 (colored)

Fix a couple of edge cases with the jump-back-xxx commands, and also
update back-to-indentation to use grid_reader, thereby fixing line
wrapping issues. From Anindya Mukherjee, GitHub issue 2633.

Revision 1.321 / (download) - annotate - [select for diffs], Thu Apr 1 06:46:12 2021 UTC (3 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.320: +162 -51 lines
Diff to previous 1.320 (colored)

Change search-again with vi keys to work like actual vi(1), also some
other fixes. From Aaron Jensen with help from Anindya Mukherjee.

Revision 1.320 / (download) - annotate - [select for diffs], Tue Mar 9 13:07:50 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.319: +6 -3 lines
Diff to previous 1.319 (colored)

Allow cursor to be just after match if copying, GitHub issue 2602.

Revision 1.319 / (download) - annotate - [select for diffs], Tue Mar 9 08:24:09 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.318: +49 -73 lines
Diff to previous 1.318 (colored)

Copy mode improvements from Anindya Mukherjee:

- Fix word and word-end for wrapped lines.
- Fix copying of selection end on wrapped lines.
- Fix wrapped word selection edge case.
- Update select-line to respect wrapped lines.
- Update window_copy_..._pos() functions to use grid_reader.

GitHub issue 2605.

Revision 1.318 / (download) - annotate - [select for diffs], Tue Mar 2 10:56:45 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.317: +3 -3 lines
Diff to previous 1.317 (colored)

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

Revision 1.317 / (download) - annotate - [select for diffs], Mon Feb 22 08:31:19 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.316: +59 -2 lines
Diff to previous 1.316 (colored)

Fix regex searching with wrapped lines, from Anindya Mukherjee; GitHub
issue 2570.

Revision 1.316 / (download) - annotate - [select for diffs], Mon Feb 22 07:09:06 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.315: +4 -4 lines
Diff to previous 1.315 (colored)

There are many format variables now so allocating all the default ones
each time a tree is created is too expensive. Instead, convert them all
into callbacks and put them in a static table so they only allocate on
demand. The tree remains for the moment for extra (non-default)
variables added by for example copy mode or popups. Also reduce
expensive calls to localtime_r/strftime. GitHub issue 2253.

Revision 1.315 / (download) - annotate - [select for diffs], Mon Feb 22 06:53:04 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.314: +134 -212 lines
Diff to previous 1.314 (colored)

Move jump commands to grid reader, make them UTF-8 aware, and tidy up,
from Anindya Mukherjee.

Revision 1.314 / (download) - annotate - [select for diffs], Mon Feb 8 14:46:53 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.313: +72 -7 lines
Diff to previous 1.313 (colored)

Add "pipe" variants of the "copy-pipe" commands which do not copy, from
Christian Zangl.

Revision 1.313 / (download) - annotate - [select for diffs], Fri Jan 22 10:24:52 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.312: +33 -5 lines
Diff to previous 1.312 (colored)

Add rectangle-on and rectangle-off copy mode commands, GitHub isse 2546
from author at will dot party.

Revision 1.312 / (download) - annotate - [select for diffs], Fri Jan 22 10:21:24 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.311: +57 -43 lines
Diff to previous 1.311 (colored)

Fix some cursor movement commands, from Anindya Mukherjee.

Revision 1.311 / (download) - annotate - [select for diffs], Mon Jan 18 11:14:24 2021 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.310: +18 -21 lines
Diff to previous 1.310 (colored)

Hide some warnings on newer GCC versions, GitHUb issue 2525.

Revision 1.310 / (download) - annotate - [select for diffs], Fri Jan 8 08:22:10 2021 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.309: +5 -1 lines
Diff to previous 1.309 (colored)

With incremental search, start empty and only repeat the previous search
if the user tries to search again with an empty prompt. This matches
emacs behaviour more closely.

Revision 1.309 / (download) - annotate - [select for diffs], Wed Jan 6 07:29:49 2021 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.308: +2 -7 lines
Diff to previous 1.308 (colored)

Remove unused variable, from Ben Boeckel.

Revision 1.308 / (download) - annotate - [select for diffs], Mon Dec 28 09:36:26 2020 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.307: +8 -17 lines
Diff to previous 1.307 (colored)

Remove current match indicator which can't work anymore since we only
search the visible region. From Anindya Mukherjee, GitHub issue 2508.

Revision 1.307 / (download) - annotate - [select for diffs], Tue Dec 22 09:22:14 2020 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.306: +190 -145 lines
Diff to previous 1.306 (colored)

Break cursor movement in grid into a common set of functions that can
handle line wrapping and so on in one place and use them for the obvious
copy mode commands. From Anindya Mukherjee.

Revision 1.306 / (download) - annotate - [select for diffs], Tue Nov 10 08:16:52 2020 UTC (3 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.305: +10 -13 lines
Diff to previous 1.305 (colored)

Allow previous-word to scroll onto the first line, noticed by Anindya
Mukherjee.

Revision 1.305 / (download) - annotate - [select for diffs], Tue Sep 22 08:41:27 2020 UTC (3 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.304: +6 -6 lines
Diff to previous 1.304 (colored)

Do not wrap at end of text when positioning at end of match because the
length may include trailing spaces.

Revision 1.304 / (download) - annotate - [select for diffs], Fri Sep 18 11:23:29 2020 UTC (3 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.303: +5 -7 lines
Diff to previous 1.303 (colored)

Free buffer earlier to avoid confusing some compilers, GitHub issue
2382.

Revision 1.303 / (download) - annotate - [select for diffs], Wed Sep 16 18:37:55 2020 UTC (3 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.302: +3 -20 lines
Diff to previous 1.302 (colored)

Fix some warnings, GitHub issue 2382.

Revision 1.302 / (download) - annotate - [select for diffs], Wed Aug 5 09:11:09 2020 UTC (3 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.301: +70 -51 lines
Diff to previous 1.301 (colored)

Change searching to behave more like emacs and so that regex searching
doesn't overlap when searching forwards.

Revision 1.301 / (download) - annotate - [select for diffs], Wed Jul 15 10:09:54 2020 UTC (3 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.300: +6 -1 lines
Diff to previous 1.300 (colored)

Handle padding cells correctly when searching, GitHub issue 2301.

Revision 1.300 / (download) - annotate - [select for diffs], Tue Jun 16 07:28:57 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.299: +5 -5 lines
Diff to previous 1.299 (colored)

Correctly move to previous line when looking for previous word, from
Derry Jing.

Revision 1.299 / (download) - annotate - [select for diffs], Thu Jun 11 19:43:34 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.298: +43 -20 lines
Diff to previous 1.298 (colored)

Add some formats for search in copy mode (search_present, search_match).
GitHub issue 2268.

Revision 1.298 / (download) - annotate - [select for diffs], Fri Jun 5 07:44:42 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.297: +1 -13 lines
Diff to previous 1.297 (colored)

Now that we mostly only search visible text, the rate limit on repeating
search does not seem to be necessary, remove it for the moment.

Revision 1.297 / (download) - annotate - [select for diffs], Thu Jun 4 21:40:27 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.296: +35 -17 lines
Diff to previous 1.296 (colored)

Search marks outside the visible text are not useful, so there is no
point in allocating a big buffer to store them - just allocate the
visible text size, and ignore any outside.

Revision 1.296 / (download) - annotate - [select for diffs], Thu Jun 4 20:41:57 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.295: +87 -53 lines
Diff to previous 1.295 (colored)

Some improvements to performance of searching:

- Do not allow searches to be repeated at intervals of less than 50
  milliseconds, to prevent a huge queue of repeat key presses blocking
  up everything for ages.

- If the search text hasn't changed, the match count can't have changed
  and there is no need to do a full search, so only search the visible
  text. This includes both scrolling and repeating the search.

- Do not redraw twice when jumping to the search location.

GitHub issue 2258.

Revision 1.295 / (download) - annotate - [select for diffs], Thu Jun 4 10:24:14 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.294: +83 -73 lines
Diff to previous 1.294 (colored)

Make the -no-clear command variants not clear the search marks either.

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

Missing ; in previous.

Revision 1.293 / (download) - annotate - [select for diffs], Tue Jun 2 19:10:26 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.292: +6 -5 lines
Diff to previous 1.292 (colored)

Fire copy-pipe command even if there is no text, means it works if it
has side effects.

Revision 1.292 / (download) - annotate - [select for diffs], Tue Jun 2 08:17:27 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.291: +4 -13 lines
Diff to previous 1.291 (colored)

Use CLOCK_MONOTONIC for timer measurement and add a timestamp to control
mode %output blocks.

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

Tidy up new UTF-8 code and make it more generic.

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

Do not attempt to divide by zero when working out copy position.

Revision 1.289 / (download) - annotate - [select for diffs], Mon May 25 09:32:10 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.288: +24 -6 lines
Diff to previous 1.288 (colored)

Instead of storing all UTF-8 characters in the extended cell which means
that 14 bytes are wasted for each character in the BMP, only store
characters of three bytes or less in the cell itself and store others
(outside the BMP or with combining characters) in a separate global
tree. Can reduce grid memory use for heavy Unicode users by around 30%.

Revision 1.288 / (download) - annotate - [select for diffs], Sat May 16 16:10:28 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.287: +99 -10 lines
Diff to previous 1.287 (colored)

Add a mark in copy mode. Set with set-mark command (bound to 'X') by
default and the mark and cursor position are swapped with 'jump-to-mark'
(bound to M-x). The line containing the mark is shown in
copy-mode-mark-style with the horizontal position in reverse.

From Anindya Mukherjee in GitHub issue 2209.

Revision 1.287 / (download) - annotate - [select for diffs], Sat May 16 16:03:57 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.286: +5 -2 lines
Diff to previous 1.286 (colored)

Do not loop forever when search finds an empty match, GitHub issue 2203.

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

Fix next-matching-bracket logic, from Chris Barber.

Revision 1.285 / (download) - annotate - [select for diffs], Sat May 16 15:49:20 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.284: +42 -13 lines
Diff to previous 1.284 (colored)

Store and restore cursor position when copy mode is resized, from
Anindya Mukherjee.

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

Try to search the entire history first for up to 200 ms so a search
count can be shown. If it takes too long, search the visible text only.

Revision 1.283 / (download) - annotate - [select for diffs], Sat May 16 15:34:08 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.282: +13 -13 lines
Diff to previous 1.282 (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.282 / (download) - annotate - [select for diffs], Sat May 16 15:11:52 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.281: +134 -16 lines
Diff to previous 1.281 (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.281 / (download) - annotate - [select for diffs], Sat May 16 15:01:31 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.280: +3 -3 lines
Diff to previous 1.280 (colored)

Drop having a separate type for style options and make them all strings,
which allows formats to be expanded. Any styles without a '#{' are still
validated when they are set but any with a '#{' are not. Formats are not
expanded usefully in many cases yet, that will be changed later.

To make this work, a few other changes:

- set-option -a with a style option automatically appends a ",".

- OSC 10 and 11 don't set the window-style option anymore, instead the
  fg and bg are stored in the pane struct and act as the defaults that
  can be overridden by window-style.

- status-fg and -bg now override status-style instead of trying to keep
  them in sync.

Revision 1.280 / (download) - annotate - [select for diffs], Sat May 16 14:22:51 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.279: +2 -1 lines
Diff to previous 1.279 (colored)

Add extension terminfo(5) capabilities for margins.

Revision 1.279 / (download) - annotate - [select for diffs], Mon Apr 20 06:08:37 2020 UTC (4 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.278: +12 -9 lines
Diff to previous 1.278 (colored)

Only trim blank lines when the source pane is not the target pane,
otherwise the cursor moves which is a bit strange.

Revision 1.278 / (download) - annotate - [select for diffs], Fri Apr 17 14:06:42 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.277: +11 -3 lines
Diff to previous 1.277 (colored)

Make sure the cursor position is still on screen after we have trimmed
empty lines. Also improve some log messages.

Revision 1.277 / (download) - annotate - [select for diffs], Fri Apr 17 08:03:22 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.276: +14 -10 lines
Diff to previous 1.276 (colored)

Add a copy-command option and change copy-pipe and friends to pipe to it
if used without arguments, allows all copy key bindings to be changed to
pipe with one option.

Revision 1.276 / (download) - annotate - [select for diffs], Thu Apr 16 05:22:08 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.275: +2 -2 lines
Diff to previous 1.275 (colored)

Don't miss the last line off the screen when writing after resize, from
Anindya Mukherjee.

Revision 1.275 / (download) - annotate - [select for diffs], Wed Apr 15 19:06:49 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.274: +23 -15 lines
Diff to previous 1.274 (colored)

Clear the selection and repeat the search on refresh same as resize.

Revision 1.274 / (download) - annotate - [select for diffs], Wed Apr 15 17:50:02 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.273: +36 -32 lines
Diff to previous 1.273 (colored)

Instead of fixing with the cursor position when the copied screen is
created, resize it and let the resize/reflow code fix it up and return
it. Solves various problems with cursor position and resizing when in
copy mode. With Anindya Mukherjee.

Revision 1.273 / (download) - annotate - [select for diffs], Tue Apr 14 19:07:10 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.272: +2 -4 lines
Diff to previous 1.272 (colored)

Leave the cursor above empty lines.

Revision 1.272 / (download) - annotate - [select for diffs], Tue Apr 14 18:33:01 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.271: +12 -4 lines
Diff to previous 1.271 (colored)

Adjust cursor and scroll positions when entering copy mode so that the
cursor line is still visible even if the source and target panes are
different heights.

Revision 1.271 / (download) - annotate - [select for diffs], Mon Apr 13 20:51:57 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.270: +3 -2 lines
Diff to previous 1.270 (colored)

Make client -c and -t handling common in cmd-queue.c and try to be
clearer about whether the client is the target client (must have a
session) or not.

Revision 1.270 / (download) - annotate - [select for diffs], Fri Apr 10 07:44:26 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.269: +28 -23 lines
Diff to previous 1.269 (colored)

Now that copy mode copies the pane content rather than keeping a
reference to it, it isn't necessary that the pane in copy mode is the
same as the one copying from. Add a -s flag to copy-mode to specify a
different pane for the source content. This means it is possible to view
two places in a pane's history at the same time in different panes, or
copy from a pane's history into an editor or shell in the same pane.

From Anindya Mukherjee.

Revision 1.269 / (download) - annotate - [select for diffs], Thu Apr 9 14:30:28 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.268: +4 -3 lines
Diff to previous 1.268 (colored)

Fix history-bottom to use the right line when working out the length.

Revision 1.268 / (download) - annotate - [select for diffs], Thu Apr 9 14:23:34 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.267: +2 -2 lines
Diff to previous 1.267 (colored)

Some minor style nits.

Revision 1.267 / (download) - annotate - [select for diffs], Thu Apr 9 13:52:31 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.266: +1 -2 lines
Diff to previous 1.266 (colored)

Some unnecessary assignments and unused variables.

Revision 1.266 / (download) - annotate - [select for diffs], Mon Apr 6 17:51:34 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.265: +51 -20 lines
Diff to previous 1.265 (colored)

Change copy mode to make copy of the pane history so it does not need to
freeze updates (which does not play nicely with some applications, a
longstanding problem) and will allow some other changes later. From
Anindya Mukherjee.

Revision 1.265 / (download) - annotate - [select for diffs], Fri Apr 3 05:18:02 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.264: +3 -6 lines
Diff to previous 1.264 (colored)

Check previous line rather than an extra line, from Anindya Mukherjee.

Revision 1.264 / (download) - annotate - [select for diffs], Thu Apr 2 17:03:10 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.263: +25 -2 lines
Diff to previous 1.263 (colored)

Only search the visible part of the history when marking (highlighting)
search terms, much faster than searching the whole history.

Revision 1.263 / (download) - annotate - [select for diffs], Wed Apr 1 09:36:37 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.262: +40 -6 lines
Diff to previous 1.262 (colored)

Add a 10 second timeout to prevent searches taking too much time, from
Anindya Mukherjee.

Revision 1.262 / (download) - annotate - [select for diffs], Wed Apr 1 08:07:05 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.261: +9 -5 lines
Diff to previous 1.261 (colored)

Do not go down the regex search path (which is expensive because we need
to convert the grid data into a string for regexec and reverse it to
find the grid position) if the search string does not contain any regex
special characters.

Revision 1.261 / (download) - annotate - [select for diffs], Wed Apr 1 07:52:07 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.260: +4 -3 lines
Diff to previous 1.260 (colored)

Use a comparison to check for wrap and avoid an expensive modulus.

Revision 1.260 / (download) - annotate - [select for diffs], Wed Apr 1 07:35:10 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.259: +141 -103 lines
Diff to previous 1.259 (colored)

Performance improvements for regex searching, most notably:

- Use the grid data directly instead of copying it.

- Special case the most typical one byte character cells and use memcmp
  for multiple bytes instead of a handrolled loop.

- Hoist regcomp out of the loop into the calling functions.

GitHub issue 2143.

Also a man page from from jmc@.

Revision 1.259 / (download) - annotate - [select for diffs], Tue Mar 31 16:53:23 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.258: +92 -45 lines
Diff to previous 1.258 (colored)

Add non-regex search variants to avoid the performance cost for people
with large histories or long lines.

Revision 1.258 / (download) - annotate - [select for diffs], Sat Mar 21 13:19:56 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.257: +3 -3 lines
Diff to previous 1.257 (colored)

Set end position correctly, GitHub issue 2129 from Anindya Mukherjee.

Revision 1.257 / (download) - annotate - [select for diffs], Fri Mar 20 20:12:39 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.256: +7 -6 lines
Diff to previous 1.256 (colored)

Fix select-word when not on a word, from Anindya Mukherjee.

Revision 1.256 / (download) - annotate - [select for diffs], Fri Mar 20 17:59:40 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.255: +24 -3 lines
Diff to previous 1.255 (colored)

Make the mouse_word and mouse_line formats work in copy mode and enable
the default pane menu in copy mode.

Revision 1.255 / (download) - annotate - [select for diffs], Fri Mar 20 13:12:04 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.254: +10 -9 lines
Diff to previous 1.254 (colored)

select_word_end needs to forward no_reset flag or select-word selects
too much.

Revision 1.254 / (download) - annotate - [select for diffs], Fri Mar 20 06:09:19 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.253: +3 -1 lines
Diff to previous 1.253 (colored)

Another fix to make other-end forget the selection mode, from Anindya Mukherjee.

Revision 1.253 / (download) - annotate - [select for diffs], Thu Mar 19 13:43:18 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.252: +3 -3 lines
Diff to previous 1.252 (colored)

Add a flag to run a background process in a pty as well, not used for
anything yet.

Revision 1.252 / (download) - annotate - [select for diffs], Thu Mar 19 13:28:52 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.251: +59 -52 lines
Diff to previous 1.251 (colored)

Various fixes to copying with select-word and select-line, including
making it consistent with keys and with the mouse, and using other-end.
From Anindya Mukherjee.

Revision 1.251 / (download) - annotate - [select for diffs], Mon Mar 16 14:17:56 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.250: +6 -6 lines
Diff to previous 1.250 (colored)

Adjust selection correctly when scrolling, from Anindya Mukherjee.

Revision 1.250 / (download) - annotate - [select for diffs], Sun Mar 15 20:44:19 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.249: +4 -1 lines
Diff to previous 1.249 (colored)

Reset selection flag when clearing or stopping selection, from Mark
Kelly.

Revision 1.249 / (download) - annotate - [select for diffs], Thu Mar 12 13:19:20 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.248: +4 -2 lines
Diff to previous 1.248 (colored)

Add a copy-mode -H flag to hide the position marker in the top right.

Revision 1.248 / (download) - annotate - [select for diffs], Wed Mar 11 18:46:42 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.247: +5 -2 lines
Diff to previous 1.247 (colored)

Start a new selection if outside the existing selection after a word has
been selected. From Anindya Mukherjee.

Revision 1.247 / (download) - annotate - [select for diffs], Mon Feb 24 09:53:59 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.246: +244 -18 lines
Diff to previous 1.246 (colored)

Change mouse selection so that after selecting a word, dragging selects
only words and similar for lines. From Anindya Mukherjee.

Revision 1.246 / (download) - annotate - [select for diffs], Thu Feb 20 07:34:57 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.245: +5 -2 lines
Diff to previous 1.245 (colored)

Add selection_active format for when the selection is present but not
moving with the cursor, from Mark Kelly.

Revision 1.245 / (download) - annotate - [select for diffs], Thu Feb 13 09:02:07 2020 UTC (4 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.244: +14 -2 lines
Diff to previous 1.244 (colored)

Do not jump to next word end if already on a word end when selecting a
word. Fixes select-word with single character words and vi(1) keys. From
Mark Kelly.

Revision 1.244 / (download) - annotate - [select for diffs], Fri Dec 27 18:42:49 2019 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.243: +359 -38 lines
Diff to previous 1.243 (colored)

Support regex search in copy mode, from Anindya Mukherjee in GitHub
issue 2038.

Revision 1.243 / (download) - annotate - [select for diffs], Wed Dec 11 18:30:29 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.242: +13 -5 lines
Diff to previous 1.242 (colored)

Tweak previous to check the wrapped flag and stop if not set.

Revision 1.242 / (download) - annotate - [select for diffs], Wed Dec 11 18:23:34 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.241: +32 -16 lines
Diff to previous 1.241 (colored)

Allow search across wrapped lines and fix some inconsistencies in how th
position is represented, GitHub issue 2014 from Anindya Mukherjee.

Revision 1.241 / (download) - annotate - [select for diffs], Mon Nov 25 22:38:36 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.240: +2 -2 lines
Diff to previous 1.240 (colored)

Don't use motion flag uninitialized.

Revision 1.240 / (download) - annotate - [select for diffs], Mon Nov 25 20:43:32 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.239: +2 -2 lines
Diff to previous 1.239 (colored)

Fix a warning in previous.

Revision 1.239 / (download) - annotate - [select for diffs], Mon Nov 25 20:42:18 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.238: +75 -66 lines
Diff to previous 1.238 (colored)

Do not clear search marks on cursor movement with vi(1) keys, from Eric
Pruitt in GitHub issue 1985.

Revision 1.238 / (download) - annotate - [select for diffs], Thu Nov 7 07:11:25 2019 UTC (4 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.237: +29 -5 lines
Diff to previous 1.237 (colored)

Add -F flag to send-keys to expand formats in search-backward and
forward copy mode commands, this makes it easier to use the cursor_word
and cursor_line formats. From Anindya Mukherjee in GitHub issue 1964.

Revision 1.237 / (download) - annotate - [select for diffs], Wed Oct 23 07:42:05 2019 UTC (4 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.236: +14 -1 lines
Diff to previous 1.236 (colored)

Use the existing code in format.c to add foramts for word and line at
cursor position in copy mode, from Anindya Mukherjee.

Revision 1.236 / (download) - annotate - [select for diffs], Sat Oct 19 19:20:14 2019 UTC (4 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.235: +12 -2 lines
Diff to previous 1.235 (colored)

Add formats for cursor and selection position in copy mode, from Jason Felice.

Revision 1.235 / (download) - annotate - [select for diffs], Tue Sep 10 07:50:33 2019 UTC (4 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.234: +1 -2 lines
Diff to previous 1.234 (colored)

Set up format tree for %if, GitHub issue 1896.

Revision 1.234 / (download) - annotate - [select for diffs], Mon Sep 9 08:01:21 2019 UTC (4 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.233: +18 -1 lines
Diff to previous 1.233 (colored)

Add cursor-down-and-cancel, from Mark Kelly.

Revision 1.233 / (download) - annotate - [select for diffs], Wed Aug 14 10:02:24 2019 UTC (4 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.232: +21 -11 lines
Diff to previous 1.232 (colored)

Default to previous search string for search-forward and
search-backward, from Leah Neukirchen.

Revision 1.232 / (download) - annotate - [select for diffs], Wed Aug 14 09:59:43 2019 UTC (4 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.231: +6 -7 lines
Diff to previous 1.231 (colored)

Revert a change I did not mean to commit yet.

Revision 1.231 / (download) - annotate - [select for diffs], Wed Aug 14 09:58:31 2019 UTC (4 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.230: +8 -7 lines
Diff to previous 1.230 (colored)

Add -Z flag to rotate-window, select-pane, swap-pane, switch-client to
preserve zoomed state. GitHub issue 1839.

Revision 1.230 / (download) - annotate - [select for diffs], Thu Aug 1 14:31:39 2019 UTC (4 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.229: +22 -14 lines
Diff to previous 1.229 (colored)

Correctly wrap search in copy mode even if at the very top left, GitHub
issue 1845.

Revision 1.229 / (download) - annotate - [select for diffs], Thu Aug 1 14:30:31 2019 UTC (4 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.228: +28 -26 lines
Diff to previous 1.228 (colored)

Select the correct word for select-word when already at the start of a
word, GitHub issue 1820.

Revision 1.228 / (download) - annotate - [select for diffs], Mon Jul 8 20:29:11 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.227: +5 -2 lines
Diff to previous 1.227 (colored)

Clear search marks before resize, GitHub issue 1823.

Revision 1.227 / (download) - annotate - [select for diffs], Fri Jul 5 07:52:27 2019 UTC (4 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.226: +2 -2 lines
Diff to previous 1.226 (colored)

Do not use uninitialized buffer name.

Revision 1.226 / (download) - annotate - [select for diffs], Thu Jun 13 20:38:05 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.225: +5 -5 lines
Diff to previous 1.225 (colored)

Set the cursor x at the same time as changing the y or the end of line
marker may not be redrawn.

Revision 1.225 / (download) - annotate - [select for diffs], Wed Jun 5 19:00:36 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.224: +9 -9 lines
Diff to previous 1.224 (colored)

Need to increment the argument to skip the prefix earlier, fixes
repeated incremental search in copy mode, reported by Kaushal Modi in
GitHub issue 1780.

Revision 1.224 / (download) - annotate - [select for diffs], Sun May 26 17:34:45 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.223: +3 -38 lines
Diff to previous 1.223 (colored)

Add formats for word and line under the mouse and use them to add some
items to the pane menu.

Revision 1.223 / (download) - annotate - [select for diffs], Wed May 15 19:25:53 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.222: +13 -5 lines
Diff to previous 1.222 (colored)

Fix dragging when in view mode rather than copy mode, GitHub issue 1740
from Brad Town.

Revision 1.222 / (download) - annotate - [select for diffs], Sun May 12 18:16:33 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.221: +1 -4 lines
Diff to previous 1.221 (colored)

Fix some indentation and dead assignments.

Revision 1.221 / (download) - annotate - [select for diffs], Tue May 7 19:46:17 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.220: +13 -3 lines
Diff to previous 1.220 (colored)

Adjust the same bit to adjust the selection for history-top and
history-bottom as for cursor-up and cursor-down. GitHub issue 1723.

Revision 1.220 / (download) - annotate - [select for diffs], Fri May 3 18:42:40 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.219: +3 -1 lines
Diff to previous 1.219 (colored)

Do not store the mouse position we calculate as the start of a drag back
into the mouse event that later code uses, it has been adjusted and they
should use the original position. GitHub issue 1710.

Revision 1.219 / (download) - annotate - [select for diffs], Wed May 1 06:07:14 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.218: +2 -3 lines
Diff to previous 1.218 (colored)

Remove unused variable from Thomas Adam.

Revision 1.218 / (download) - annotate - [select for diffs], Mon Apr 29 06:55:21 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.217: +223 -2 lines
Diff to previous 1.217 (colored)

Add support for keys to jump between matching brackets - C-M-f and C-M-b
in emacs, % in vi. Suggested by and help from Chris Barber in GitHub
issue 1666.

Revision 1.217 / (download) - annotate - [select for diffs], Thu Apr 25 06:34:57 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.216: +71 -3 lines
Diff to previous 1.216 (colored)

Automatically scroll if dragging to create a selection with the mouse
and the cursor reaches the top or bottom line.

Revision 1.216 / (download) - annotate - [select for diffs], Tue Apr 23 09:39:07 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.215: +30 -35 lines
Diff to previous 1.215 (colored)

Add -no-clear variants of copy-selection and copy-pipe which do not
clear the selection after copying. Make copy-pipe clear the selection by
default to be consistent with copy-selection. From Avi Halachmi.

Revision 1.215 / (download) - annotate - [select for diffs], Tue Apr 2 09:03:39 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.214: +104 -39 lines
Diff to previous 1.214 (colored)

Add an argument to copy commands to set the prefix for the buffer name,
allows buffers for different sessions to be named separately.

Revision 1.214 / (download) - annotate - [select for diffs], Wed Mar 27 13:25:11 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.213: +2 -1 lines
Diff to previous 1.213 (colored)

Fix stop-selection, from Avi Halachmi.

Revision 1.213 / (download) - annotate - [select for diffs], Tue Mar 26 21:01:19 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.212: +1031 -422 lines
Diff to previous 1.212 (colored)

Break copy mode commands into individual functions instead of a big load
of if statements.

Revision 1.212 / (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.211: +11 -11 lines
Diff to previous 1.211 (colored)

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

Revision 1.211 / (download) - annotate - [select for diffs], Tue Mar 12 11:16:50 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.210: +36 -27 lines
Diff to previous 1.210 (colored)

Allow multiple modes to be open in a pane. A stack of open modes is kept
and the previous restored when the top is exited. If a mode that is
already on the stack is entered, the existing instance is moved to the
top as the active mode rather than being opened new.

Revision 1.210 / (download) - annotate - [select for diffs], Fri Mar 8 10:34:20 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.209: +47 -39 lines
Diff to previous 1.209 (colored)

Make the mode used to view command output (a variant of copy mode) use
its own mode definition struct with a different init function rather
than calling special setup functions.

Revision 1.209 / (download) - annotate - [select for diffs], Fri Mar 8 10:29:25 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.208: +3 -2 lines
Diff to previous 1.208 (colored)

Do not use window mode entry after free.

Revision 1.208 / (download) - annotate - [select for diffs], Thu Mar 7 20:24:21 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.207: +495 -443 lines
Diff to previous 1.207 (colored)

Add a separate mode struct for the active window mode if any.

Revision 1.207 / (download) - annotate - [select for diffs], Thu Mar 7 19:34:22 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.206: +7 -1 lines
Diff to previous 1.206 (colored)

Tidy changing the mode into window_copy_init_for_output.

Revision 1.206 / (download) - annotate - [select for diffs], Thu Mar 7 19:01:21 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.205: +14 -15 lines
Diff to previous 1.205 (colored)

Make adding mode formats a function pointer as well.

Revision 1.205 / (download) - annotate - [select for diffs], Tue Dec 18 13:20:44 2018 UTC (5 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.204: +4 -3 lines
Diff to previous 1.204 (colored)

Pass window into mode functions.

Revision 1.204 / (download) - annotate - [select for diffs], Wed Nov 28 11:20:13 2018 UTC (5 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.203: +19 -7 lines
Diff to previous 1.203 (colored)

Handle UTF-8 in word-separators option, GitHub issue 1551.

Revision 1.203 / (download) - annotate - [select for diffs], Thu Nov 8 18:49:19 2018 UTC (5 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.202: +24 -32 lines
Diff to previous 1.202 (colored)

It isn't possible to specify buffer name to copy mode commands now, so
remove the function argument.

Revision 1.202 / (download) - annotate - [select for diffs], Wed Oct 3 15:27:55 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.201: +2 -2 lines
Diff to previous 1.201 (colored)

Do not move the cursor when the mouse wheel is used, GitHub issue 1493.

Revision 1.201 / (download) - annotate - [select for diffs], Tue Sep 25 14:27:20 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.200: +2 -2 lines
Diff to previous 1.200 (colored)

Allow panes to be 1 line or column by redrawing instead of using the
scroll region, from Soeren Tempel in GitHub issue 1487.

Revision 1.200 / (download) - annotate - [select for diffs], Mon Sep 10 06:48:01 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.199: +1 -2 lines
Diff to previous 1.199 (colored)

Do not clear selection when searching.

Revision 1.199 / (download) - annotate - [select for diffs], Mon Sep 3 08:51:43 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.198: +5 -3 lines
Diff to previous 1.198 (colored)

Allow a large line number to go to the end with goto-line, from Mark
Kelly in GitHub issue 1460.

Revision 1.198 / (download) - annotate - [select for diffs], Mon Sep 3 08:47:27 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.197: +2 -2 lines
Diff to previous 1.197 (colored)

Fix selection test, from Takeshi Banse.

Revision 1.197 / (download) - annotate - [select for diffs], Wed Aug 29 18:54:23 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.196: +2 -1 lines
Diff to previous 1.196 (colored)

Reset line flag when clearing selection, GitHub issue 1454.

Revision 1.196 / (download) - annotate - [select for diffs], Thu Aug 23 15:45:05 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.195: +2 -2 lines
Diff to previous 1.195 (colored)

Move job struct into job.c.

Revision 1.195 / (download) - annotate - [select for diffs], Mon Aug 20 13:51:09 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.194: +13 -11 lines
Diff to previous 1.194 (colored)

Fix problems with page scrolling in copy mode, GitHub issue 1440 from
Amos Bird.

Revision 1.194 / (download) - annotate - [select for diffs], Sun Aug 5 08:59:30 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.193: +2 -14 lines
Diff to previous 1.193 (colored)

calloc the mode data instead of malloc and initialize everything.

Revision 1.193 / (download) - annotate - [select for diffs], Wed Aug 1 15:22:40 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.192: +2 -1 lines
Diff to previous 1.192 (colored)

Initialize new lineflag member.

Revision 1.192 / (download) - annotate - [select for diffs], Tue Jul 31 11:49:26 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.191: +58 -46 lines
Diff to previous 1.191 (colored)

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

Revision 1.191 / (download) - annotate - [select for diffs], Fri Jul 6 07:11:23 2018 UTC (5 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.190: +2 -1 lines
Diff to previous 1.190 (colored)

Add a rectangle_toggle format, from Hirokazu Hata.

Revision 1.190 / (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.189: +12 -9 lines
Diff to previous 1.189 (colored)

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

Revision 1.189 / (download) - annotate - [select for diffs], Tue Jun 26 11:14:05 2018 UTC (5 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.188: +2 -3 lines
Diff to previous 1.188 (colored)

Do not take address of a member of a NULL pointer. GitHub issue 1382
from Kamil Rytarowski.

Revision 1.188 / (download) - annotate - [select for diffs], Mon Apr 23 13:46:34 2018 UTC (6 years ago) by nicm
Branch: MAIN
Changes since 1.187: +11 -7 lines
Diff to previous 1.187 (colored)

Check whether cursor is at start or end when copying rectangular
selections, from tb@.

Revision 1.187 / (download) - annotate - [select for diffs], Thu Mar 8 08:09:10 2018 UTC (6 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.186: +2 -2 lines
Diff to previous 1.186 (colored)

Add a missing client-detached hook when the server shuts down, and do
not exit until jobs started from run-shell/if-shell have finished (add a
job flags member and a flag to indicate other jobs). GitHub issue 1245.

Revision 1.186 / (download) - annotate - [select for diffs], Thu Nov 16 11:16:15 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.185: +26 -11 lines
Diff to previous 1.185 (colored)

Add -and-cancel variants for scrolling commands to exit copy mode when
the bottom is reached, from Stephen Hicks.

Revision 1.185 / (download) - annotate - [select for diffs], Mon Nov 13 11:49:11 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.184: +16 -12 lines
Diff to previous 1.184 (colored)

When searching in copy mode, do not scroll if the result is already on
screen. GitHub issue 1150.

Revision 1.184 / (download) - annotate - [select for diffs], Wed Sep 13 07:31:07 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.183: +36 -39 lines
Diff to previous 1.183 (colored)

Remove unused (always 1) arguments from some functions, from Daniel
Mueller in GitHub issue 1073.

Revision 1.183 / (download) - annotate - [select for diffs], Mon Sep 4 09:18:51 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.182: +2 -2 lines
Diff to previous 1.182 (colored)

Move to current mouse position not last when clcking in copy mode; fixes
GitHub issue 1055. Also a man page fix from jmc.

Revision 1.182 / (download) - annotate - [select for diffs], Tue Aug 29 20:26:25 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.181: +12 -5 lines
Diff to previous 1.181 (colored)

Redraw rectangle selections properly when cursor at end, GitHub issue 992.

Revision 1.181 / (download) - annotate - [select for diffs], Wed Aug 23 09:18:22 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.180: +2 -2 lines
Diff to previous 1.180 (colored)

Fix searching when match is at end of line, from Brad Town.

Revision 1.180 / (download) - annotate - [select for diffs], Wed Aug 2 11:10:48 2017 UTC (6 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.179: +8 -5 lines
Diff to previous 1.179 (colored)

Add selection_present format so commands in copy mode can use it, GitHub
issue 1028.

Revision 1.179 / (download) - annotate - [select for diffs], Fri Jun 9 09:21:24 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.178: +3 -1 lines
Diff to previous 1.178 (colored)

Add a hook when the clipboard is set.

Revision 1.178 / (download) - annotate - [select for diffs], Sat Jun 3 17:43:01 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.177: +3 -3 lines
Diff to previous 1.177 (colored)

Make set-clipboard a three-state option so tmux itself can ignore the
sequencess.

Revision 1.177 / (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.176: +5 -3 lines
Diff to previous 1.176 (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.176 / (download) - annotate - [select for diffs], Mon May 29 07:58:33 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.175: +2 -2 lines
Diff to previous 1.175 (colored)

Do not factor in screen_hsize() for the visible copy mode screen when
adjusting the selection, it should never have any useful history (and
when it does, after resize, we shouldn't use it). From Michal Mazurek.

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

Scrolling needs to use background colour.

Revision 1.174 / (download) - annotate - [select for diffs], Fri May 12 10:45:38 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.173: +11 -16 lines
Diff to previous 1.173 (colored)

Store copy mode search string in pane so search-again command works even
if you exit and reenter copy mode (it doesn't remember the position,
just the search string), suggested by espie@.

Revision 1.173 / (download) - annotate - [select for diffs], Sun May 7 22:27:57 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.172: +3 -1 lines
Diff to previous 1.172 (colored)

Add a format for the name of the pane's mode, lets it be used as a
conditional for key bindings.

Revision 1.172 / (download) - annotate - [select for diffs], Wed May 3 05:53:34 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.171: +14 -1 lines
Diff to previous 1.171 (colored)

Add a format for the last search string in copy mode and fix the prompt
so it can work when in -I, suggested by Suraj N Kurapati.

Revision 1.171 / (download) - annotate - [select for diffs], Thu Apr 20 09:20:22 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.170: +2 -2 lines
Diff to previous 1.170 (colored)

If a #() command doesn't exit, use its most recent line of output (it
must be a full line). Don't let it redraw the status line more than once
a second.

Requested by someone about 10 years ago...

Revision 1.170 / (download) - annotate - [select for diffs], Fri Mar 24 07:14:27 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.169: +28 -4 lines
Diff to previous 1.169 (colored)

Show count of search results in copy mode.

Revision 1.169 / (download) - annotate - [select for diffs], Tue Mar 21 09:51:00 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.168: +2 -2 lines
Diff to previous 1.168 (colored)

Fix movement after select-line, from Omar Sandoval.

Revision 1.168 / (download) - annotate - [select for diffs], Wed Mar 8 20:05:25 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.167: +25 -9 lines
Diff to previous 1.167 (colored)

Skip over padding cells when moving the cursor left or right.

Revision 1.167 / (download) - annotate - [select for diffs], Wed Mar 8 13:36:12 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.166: +8 -14 lines
Diff to previous 1.166 (colored)

Add a helper function for the most common format_create/defaults/expand
pattern.

Revision 1.166 / (download) - annotate - [select for diffs], Wed Feb 8 17:33:51 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.165: +18 -12 lines
Diff to previous 1.165 (colored)

window_copy_pagedown shouldn't reset the mode anymore, instead let the
caller do it so it can free the marks. Problem reported by attila at
stalphonsos dot com.

Revision 1.165 / (download) - annotate - [select for diffs], Fri Feb 3 11:57:28 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.164: +2 -2 lines
Diff to previous 1.164 (colored)

Add a window or pane id "tag" to each format tree and use it to separate
jobs, this means that if the same job is used for different windows or
panes (for example in pane-border-format), it will be run separately for
each pane.

Revision 1.164 / (download) - annotate - [select for diffs], Sat Jan 7 15:28:13 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.163: +3 -1 lines
Diff to previous 1.163 (colored)

Add support for the OSC 4 and OSC 104 palette setting escape sequences,
from S Gilles.

Revision 1.163 / (download) - annotate - [select for diffs], Fri Jan 6 11:57:03 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.162: +130 -35 lines
Diff to previous 1.162 (colored)

Incremental search in copy mode (on for emacs keys by default) - much
the same as normal searching but updates the cursor position and marked
search terms as you type. C-r and C-s in the prompt repeat the search,
once finished searching (with Enter), N and n work as before.

Revision 1.162 / (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.161: +104 -43 lines
Diff to previous 1.161 (colored)

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

Revision 1.161 / (download) - annotate - [select for diffs], Thu Nov 24 13:38:44 2016 UTC (7 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.160: +145 -49 lines
Diff to previous 1.160 (colored)

Make the selection able to exist independent of the cursor position, so
that it is not affected by scrolling. If MouseDragEnd1Pane is bound to
the new "stop-selection" command:

    bind -Tcopy-mode MouseDragEnd1Pane stop-selection

A selection made with the mouse will stay as it is after button 1 is
released. (It also works bound to a key.)

From Artem Fokin.

Revision 1.160 / (download) - annotate - [select for diffs], Tue Nov 15 09:53:23 2016 UTC (7 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.159: +6 -2 lines
Diff to previous 1.159 (colored)

Add copy-pipe-and-cancel, from Artem Fokin.

Revision 1.159 / (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.158: +3 -3 lines
Diff to previous 1.158 (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.158 / (download) - annotate - [select for diffs], Wed Oct 12 09:07:58 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.157: +2 -3 lines
Diff to previous 1.157 (colored)

Unused variable and missing time.h.

Revision 1.157 / (download) - annotate - [select for diffs], Tue Oct 11 13:21:59 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.156: +134 -128 lines
Diff to previous 1.156 (colored)

Add static in window-*.c and move some internal functions out of tmux.h.

Revision 1.156 / (download) - annotate - [select for diffs], Tue Oct 11 09:30:36 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.155: +31 -3 lines
Diff to previous 1.155 (colored)

Support double and triple clicks (they are cumulative, so double is
fired then triple), and use for select-word and select-line in copy
mode. Inspired by a different solution from Omar Sandoval.

Revision 1.155 / (download) - annotate - [select for diffs], Tue Oct 11 07:23:34 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.154: +313 -541 lines
Diff to previous 1.154 (colored)

Fundamental change to how copy mode key bindings work:

The vi-copy and emacs-copy mode key tables are gone, and instead copy
mode commands are bound in one of two normal key tables ("copy-mode" or
"copy-mode-vi"). Keys are bound to "send-keys -X copy-mode-command". So:

    bind -temacs-copy C-Up scroll-up
    bind -temacs-copy -R5 WheelUpPane scroll-up

Becomes:

    bind -Tcopy-mode C-Up send -X scroll-up
    bind -Tcopy-mode WheelUpPane send -N5 -X scroll-up

This allows the full command parser and command set to be used - for
example, we can use the normal command prompt for searching, jumping,
and so on instead of a custom one:

    bind -Tcopy-mode C-r command-prompt -p'search up' "send -X search-backward '%%'"

command-prompt also gets a -1 option to only require on key press, which
is needed for jumping.

The plan is to get rid of mode keys entirely, so more to come eventually.

Revision 1.154 / (download) - annotate - [select for diffs], Sun Oct 9 07:30:28 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.153: +3 -2 lines
Diff to previous 1.153 (colored)

Use xsnprintf not snprintf for the prompt in window_copy_write_line
because we don't care if it is truncated to the screen width, we don't
want it to be fatal.

Revision 1.153 / (download) - annotate - [select for diffs], Mon Oct 3 22:52:11 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.152: +3 -3 lines
Diff to previous 1.152 (colored)

Remove some dead code in cmd-move-window.c and make a load of local
functions static.

Revision 1.152 / (download) - annotate - [select for diffs], Mon Sep 12 15:40:58 2016 UTC (7 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.151: +8 -8 lines
Diff to previous 1.151 (colored)

Allow repeat count to be specified in mode key tables with bind-key -R,
and set the default repeat count to 5 for WheelUp and WheelDown in
copy-mode.

Revision 1.151 / (download) - annotate - [select for diffs], Mon May 23 20:03:14 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.150: +2 -3 lines
Diff to previous 1.150 (colored)

Remove unused variable, from Ben Boeckel.

Revision 1.150 / (download) - annotate - [select for diffs], Tue May 3 13:40:50 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.149: +126 -115 lines
Diff to previous 1.149 (colored)

Some tidying of copy mode search functions, based on a diff from Lukasz
Piatkowski (initial changes to help some more to come).

Revision 1.149 / (download) - annotate - [select for diffs], Sun May 1 13:39:05 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.148: +23 -33 lines
Diff to previous 1.148 (colored)

Use the same code for half page scrolling as full, from Michal Mazurek.

Revision 1.148 / (download) - annotate - [select for diffs], Wed Apr 27 09:39:09 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.147: +49 -1 lines
Diff to previous 1.147 (colored)

Add next/previous paragraph, from J Raynor.

Revision 1.147 / (download) - annotate - [select for diffs], Fri Mar 18 14:27:24 2016 UTC (8 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.146: +70 -17 lines
Diff to previous 1.146 (colored)

Make scrolling behaviour more sensible and maintain cursor position, as
if the same had been done line-by-line. From Michal Mazurek.

Revision 1.146 / (download) - annotate - [select for diffs], Tue Mar 1 12:04:43 2016 UTC (8 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.145: +2 -15 lines
Diff to previous 1.145 (colored)

When a mouse drag is finished, fire a MouseUp key press, instead of
doing the drag end in code. From Stephen Coakley.

Revision 1.145 / (download) - annotate - [select for diffs], Fri Feb 5 10:20:06 2016 UTC (8 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.144: +10 -7 lines
Diff to previous 1.144 (colored)

Do not wrap cursor at start or end of history, from Michal Mazurek.

Revision 1.144 / (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.143: +2 -2 lines
Diff to previous 1.143 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.143 / (download) - annotate - [select for diffs], Fri Dec 11 12:27:36 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.142: +2 -2 lines
Diff to previous 1.142 (colored)

Add cmdq as an argument to format_create and add a format for the
command name (will also be used for more later).

Revision 1.142 / (download) - annotate - [select for diffs], Tue Dec 8 08:34:18 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.141: +2 -2 lines
Diff to previous 1.141 (colored)

Remove format_create_flags and just pass flags to format_create.

Revision 1.141 / (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.140: +4 -4 lines
Diff to previous 1.140 (colored)

Use __unused rather than rolling our own.

Revision 1.140 / (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.139: +48 -59 lines
Diff to previous 1.139 (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.139 / (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.138: +8 -12 lines
Diff to previous 1.138 (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.138 / (download) - annotate - [select for diffs], Thu Nov 12 11:05:34 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.137: +7 -7 lines
Diff to previous 1.137 (colored)

Support UTF-8 key bindings by expanding the key type from int to
uint64_t and converting UTF-8 to Unicode on input and the reverse on
output. (This allows key bindings, there are still omissions - the
largest being that the various prompts do not accept UTF-8.)

Revision 1.137 / (download) - annotate - [select for diffs], Sat Oct 31 08:13:58 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.136: +2 -2 lines
Diff to previous 1.136 (colored)

Because pledge(2) does not allow us to pass directory file descriptors
around, we can't use file descriptors for the working directory because
we will be unable to pass it to a privileged process to tell it where to
read or write files or spawn children. So move tmux back to using
strings for the current working directory. We try to check it exists
with access() when it is set but ultimately fall back to ~ if it fails
at time of use (or / if that fails too).

Revision 1.136 / (download) - annotate - [select for diffs], Tue Oct 27 15:58:43 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.135: +18 -18 lines
Diff to previous 1.135 (colored)

Move struct options into options.c.

Revision 1.135 / (download) - annotate - [select for diffs], Fri Oct 23 16:02:21 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.134: +11 -1 lines
Diff to previous 1.134 (colored)

Format for scroll position, from Jorge Morante.

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

Style nit, int for flags not u_int.

Revision 1.133 / (download) - annotate - [select for diffs], Sun Sep 13 13:31:40 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.132: +25 -3 lines
Diff to previous 1.132 (colored)

Add copy-mode -e to exit copy mode when scrolling off the bottom, useful
for quick view of history, from Cam Hutchison.

Revision 1.132 / (download) - annotate - [select for diffs], Sat Aug 29 09:25:00 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.131: +18 -16 lines
Diff to previous 1.131 (colored)

Move struct paste_buffer out of tmux.h.

Revision 1.131 / (download) - annotate - [select for diffs], Fri Aug 28 12:25:42 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.130: +1 -2 lines
Diff to previous 1.130 (colored)

Give clock mode its own timer.

Revision 1.130 / (download) - annotate - [select for diffs], Fri Apr 24 22:19:36 2015 UTC (9 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.129: +2 -2 lines
Diff to previous 1.129 (colored)

Set working directory for run-shell and if-shell.

Revision 1.129 / (download) - annotate - [select for diffs], Tue Apr 21 15:16:06 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.128: +4 -4 lines
Diff to previous 1.128 (colored)

cmd_mouse_pane can return NULL, check for that.

Revision 1.128 / (download) - annotate - [select for diffs], Mon Apr 20 15:41:32 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.127: +4 -8 lines
Diff to previous 1.127 (colored)

Remove unused-but-set variables, from Thomas Adam.

Revision 1.127 / (download) - annotate - [select for diffs], Mon Apr 20 09:39:21 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.126: +15 -12 lines
Diff to previous 1.126 (colored)

Make jump-to-backward/jump-to-forward repeatable with
jump-reverse/jump-again, from Jacob Niehus.

Revision 1.126 / (download) - annotate - [select for diffs], Sun Apr 19 21:34:21 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.125: +97 -103 lines
Diff to previous 1.125 (colored)

Rewrite of tmux mouse support which was a mess. Instead of having
options for "mouse-this" and "mouse-that", mouse events may be bound as
keys and there is one option "mouse" that turns on mouse support
entirely (set -g mouse on).

See the new MOUSE SUPPORT section of the man page for description of the
key names and new flags (-t= to specify the pane or window under mouse
as a target, and send-keys -M to pass through a mouse event).

The default builtin bindings for the mouse are:

    bind -n   MouseDown1Pane select-pane -t=; send-keys -M
    bind -n MouseDown1Status select-window -t=
    bind -n   MouseDrag1Pane copy-mode -M
    bind -n MouseDrag1Border resize-pane -M

To get the effect of turning mode-mouse off, do:

    unbind -n MouseDrag1Pane
    unbind -temacs-copy MouseDrag1Pane

The old mouse options are now gone, set-option -q may be used to
suppress warnings if mixing configuration files.

Revision 1.125 / (download) - annotate - [select for diffs], Fri Apr 10 16:00:08 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.124: +22 -7 lines
Diff to previous 1.124 (colored)

Add a -x flag to copy-selection, append-selection and start-named-buffer
to prevent it exiting copy mode after copying. From J Raynor with a few
tweaks by me.

Revision 1.124 / (download) - annotate - [select for diffs], Tue Mar 31 17:45:10 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.123: +2 -2 lines
Diff to previous 1.123 (colored)

Fix some format specifier nits, from Ben Boeckel.

Revision 1.123 / (download) - annotate - [select for diffs], Thu Feb 5 10:29:43 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.122: +2 -4 lines
Diff to previous 1.122 (colored)

Wrap all the individual format_* calls in a single format_defaults
functions.

Revision 1.122 / (download) - annotate - [select for diffs], Thu Jan 15 13:35:13 2015 UTC (9 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.121: +13 -10 lines
Diff to previous 1.121 (colored)

Shorten some long lines.

Revision 1.121 / (download) - annotate - [select for diffs], Mon Dec 15 10:02:55 2014 UTC (9 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.120: +22 -3 lines
Diff to previous 1.120 (colored)

Only redraw affected lines when selection changes with mouse. From
Michael Graczyk.

Revision 1.120 / (download) - annotate - [select for diffs], Sun Nov 9 15:13:01 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.119: +16 -6 lines
Diff to previous 1.119 (colored)

Expand formats in copy-pipe command, suggested by Suraj N Kurapati.

Revision 1.119 / (download) - annotate - [select for diffs], Thu Nov 6 10:56:44 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.118: +7 -8 lines
Diff to previous 1.118 (colored)

Wrap when copy mode is used for output, from Balazs Kezes.

Revision 1.118 / (download) - annotate - [select for diffs], Thu Nov 6 09:17:26 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.117: +70 -46 lines
Diff to previous 1.117 (colored)

Add V for select line with vi(1) keys. From Juho Pohjala.

Revision 1.117 / (download) - annotate - [select for diffs], Wed Oct 22 23:18:53 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.116: +2 -2 lines
Diff to previous 1.116 (colored)

Fix some spacing nits.

Revision 1.116 / (download) - annotate - [select for diffs], Wed Oct 8 17:35:58 2014 UTC (9 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.115: +6 -6 lines
Diff to previous 1.115 (colored)

Add xreallocarray and remove nmemb argument from xrealloc.

Revision 1.115 / (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.114: +9 -1 lines
Diff to previous 1.114 (colored)

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

Revision 1.114 / (download) - annotate - [select for diffs], Mon Sep 1 21:50:18 2014 UTC (9 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.113: +3 -3 lines
Diff to previous 1.113 (colored)

Various minor style and spacing nits.

Revision 1.113 / (download) - annotate - [select for diffs], Mon Aug 11 22:39:57 2014 UTC (9 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.112: +2 -2 lines
Diff to previous 1.112 (colored)

No need to repeat other-end more than once, from Juho Pohjala. Also add
it to the commands list while here.

Revision 1.112 / (download) - annotate - [select for diffs], Mon Aug 11 22:18:16 2014 UTC (9 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.111: +2 -1 lines
Diff to previous 1.111 (colored)

Fix two copy mode problems:

1. In vi mode the selection doesn't include the last character if you
   moved the cursor up or left.
2. In emacs mode the selection includes the last character if you moved
   the cursor to the left.

From Balazs Kezes.

Revision 1.111 / (download) - annotate - [select for diffs], Thu Jun 19 07:37:59 2014 UTC (9 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.110: +8 -6 lines
Diff to previous 1.110 (colored)

Copy newline when at EOL in vi(1) mode, from Balazs Kezes.

Revision 1.110 / (download) - annotate - [select for diffs], Wed May 14 06:39:58 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.109: +5 -12 lines
Diff to previous 1.109 (colored)

Simplify copy lines, from Keith Amling.

Revision 1.109 / (download) - annotate - [select for diffs], Tue May 13 07:54:20 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.108: +15 -3 lines
Diff to previous 1.108 (colored)

Add a copy mode key binding to copy to a named buffer. From J Raynor.

Revision 1.108 / (download) - annotate - [select for diffs], Tue May 13 07:34:35 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.107: +32 -40 lines
Diff to previous 1.107 (colored)

Add support for named buffers. If you don't name a buffer, things work
much as before - buffers are automatically named "buffer0000",
"buffer0001" and so on and ordered as a stack. Buffers can be named
explicitly when creating ("loadb -b foo" etc) or renamed ("setb -b
buffer0000 -n foo"). If buffers are named explicitly, they are not
deleted when buffer-limit is reached. Diff from J Raynor.

Revision 1.107 / (download) - annotate - [select for diffs], Thu Apr 24 09:14:43 2014 UTC (10 years ago) by nicm
Branch: MAIN
Changes since 1.106: +8 -8 lines
Diff to previous 1.106 (colored)

There is no longer a need for a paste_stack struct or for global_buffers
to be global. Move to paste.c.

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

Some more long lines.

Revision 1.105 / (download) - annotate - [select for diffs], Fri Apr 11 19:35:54 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.104: +9 -7 lines
Diff to previous 1.104 (colored)

Don't blindly increase offsets by the return value of snprintf, if there
wasn't enough space this will go off the end. Instead clamp to the
available space. Fixes crash reported by Julien Rebetez.

Revision 1.104 / (download) - annotate - [select for diffs], Thu Apr 3 08:20:29 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.103: +12 -11 lines
Diff to previous 1.103 (colored)

Work out mouse scroll wheel effect when the mouse is first detected and
store it in struct mouse_event, reduce the scroll size the 3 but allow
shift to reduce it to 1 and meta and ctrl to multiply by 3 if the
terminal supports them, also support wheel in choose mode. From Marcel
Partap.

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

Add setb -a to append and a copy mode append command, from J Raynor with
minor changes.

Revision 1.102 / (download) - annotate - [select for diffs], Mon Feb 17 23:07:03 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.101: +3 -3 lines
Diff to previous 1.101 (colored)

Fix memory leaks with paste_replace, based on changes from J Raynor.

Revision 1.101 / (download) - annotate - [select for diffs], Tue Jan 28 23:07:09 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.100: +3 -3 lines
Diff to previous 1.100 (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.100 / (download) - annotate - [select for diffs], Wed Jan 22 22:32:15 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.99: +25 -6 lines
Diff to previous 1.99 (colored)

Support paste key in copy mode input (for search etc). Also clamp length
to screen width.

Revision 1.99 / (download) - annotate - [select for diffs], Wed Jan 22 13:57:49 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.98: +7 -3 lines
Diff to previous 1.98 (colored)

Only exit copy mode at the bottom if no selection in progress, from
Benoit Pierre.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Nov 20 17:01:23 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.97: +3 -3 lines
Diff to previous 1.97 (colored)

missing unsigned char casts areound tolower()
ok nicm

Revision 1.97 / (download) - annotate - [select for diffs], Sat Nov 9 00:48:57 2013 UTC (10 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.96: +43 -13 lines
Diff to previous 1.96 (colored)

Support case insensitive searching in the same manner as emacs - all
lowercase means case insensitive, any uppercase means case
sensitive. From J Raynor.

Revision 1.96 / (download) - annotate - [select for diffs], Fri Nov 8 12:39:20 2013 UTC (10 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.95: +39 -40 lines
Diff to previous 1.95 (colored)

Correctly redraw the top two lines in copy mode when they are selected -
the selection was being updated before the redraw so the markings were
lost. Based on a fix from J Raynor.

Revision 1.95 / (download) - annotate - [select for diffs], Wed Oct 23 11:31:03 2013 UTC (10 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.94: +39 -1 lines
Diff to previous 1.94 (colored)

Key to swap to other end of selection (bound to o with vi keys), from J
Raynor.

Revision 1.94 / (download) - annotate - [select for diffs], Fri Jul 12 09:52:36 2013 UTC (10 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.93: +7 -4 lines
Diff to previous 1.93 (colored)

Make next-word-end work properly with vi(1) keys, reported by patrick
keshishian.

Revision 1.93 / (download) - annotate - [select for diffs], Fri Jul 5 14:44:06 2013 UTC (10 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored)

Whitespace nits, from Ben Boeckel.

Revision 1.92 / (download) - annotate - [select for diffs], Fri Jul 5 14:41:36 2013 UTC (10 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.91: +6 -1 lines
Diff to previous 1.91 (colored)

Act like vi(1) when moving words, from Ben Boeckel.

Revision 1.91 / (download) - annotate - [select for diffs], Mon Mar 25 11:43:33 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.90: +8 -4 lines
Diff to previous 1.90 (colored)

Create a new context when copying instead of using the input
context. The input context may not exist yet. Fixes crash when copying
from config file errors.

Revision 1.90 / (download) - annotate - [select for diffs], Mon Mar 25 11:43:01 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.89: +12 -12 lines
Diff to previous 1.89 (colored)

Extend jobs to support writing and use that for copy-pipe instead of
popen, from Chris Johnsen.

Revision 1.89 / (download) - annotate - [select for diffs], Fri Mar 22 15:52:42 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.88: +63 -13 lines
Diff to previous 1.88 (colored)

Add copy-pipe mode command to copy selection and also pipe to a command.

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

No more lint means no more ARGSUSED.

Revision 1.87 / (download) - annotate - [select for diffs], Tue Feb 5 11:08:59 2013 UTC (11 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.86: +3 -3 lines
Diff to previous 1.86 (colored)

Automatically reflow wrapped lines when a pane is resized, requested by
many over the years and finally implemented by Richard Woodbury.

Revision 1.86 / (download) - annotate - [select for diffs], Fri Jan 18 02:16:21 2013 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.85: +39 -46 lines
Diff to previous 1.85 (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.85 / (download) - annotate - [select for diffs], Tue Nov 27 14:42:56 2012 UTC (11 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.84: +3 -3 lines
Diff to previous 1.84 (colored)

When scrolling in copy mode with the mouse, scroll screen rather than
moving cursor. This change from Ailin Nemui, alternative to a change
from Stephen Hicks.

Revision 1.84 / (download) - annotate - [select for diffs], Fri Oct 26 14:35:42 2012 UTC (11 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.83: +6 -6 lines
Diff to previous 1.83 (colored)

Make mouse event structure clearer by defining events (up, click, drag)
and simplifying how buttons and wheels are represented, from Ailin
Nemui. Should be no functional changes.

Revision 1.83 / (download) - annotate - [select for diffs], Tue Sep 25 07:39:28 2012 UTC (11 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored)

Fix search forward so it can match strings on the last line, SF bug
3571114 from "LiJunLe".

Revision 1.82 / (download) - annotate - [select for diffs], Sat Aug 11 06:45:33 2012 UTC (11 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.81: +3 -9 lines
Diff to previous 1.81 (colored)

Instead of numbering choose mode items 0-9a-z and then nothing, number
them all and if there are more than 10 use a prompt when 0-9 is
pressed. From Thomas Adam.

Revision 1.81 / (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.80: +6 -7 lines
Diff to previous 1.80 (colored)

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

Revision 1.80 / (download) - annotate - [select for diffs], Sun Apr 1 20:53:47 2012 UTC (12 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.79: +4 -4 lines
Diff to previous 1.79 (colored)

Minor style nits - return ().

Revision 1.79 / (download) - annotate - [select for diffs], Sun Apr 1 09:23:31 2012 UTC (12 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.78: +3 -4 lines
Diff to previous 1.78 (colored)

Only exit mouse mode on scroll wheel when actually reaching the end of
the history, from James Nylen.

Revision 1.78 / (download) - annotate - [select for diffs], Sat Mar 17 21:40:53 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.77: +7 -5 lines
Diff to previous 1.77 (colored)

Add a wrap-search option to turn off wrapping of searches in copy
mode. From Jacobo de Vera.

Revision 1.77 / (download) - annotate - [select for diffs], Sun Mar 11 23:01:19 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)

Always remember last cursor position when moving up or down, not just
for if crossing zero length lines. From Itay Perl.

Revision 1.76 / (download) - annotate - [select for diffs], Sun Dec 4 16:18:01 2011 UTC (12 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.75: +100 -4 lines
Diff to previous 1.75 (colored)

Support "jump to" like vi in copy mode using t and T keys. Also add x
and X for delete in edit mode.

From Ben Boeckel, thanks.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Nov 15 23:24:04 2011 UTC (12 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.74: +4 -4 lines
Diff to previous 1.74 (colored)

Move word-separators to be a session rather than window option, from Ben
Boeckel.

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

When copying, make repeat count indicate buffer to replace if used.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Jun 27 00:04:49 2011 UTC (12 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.72: +1 -3 lines
Diff to previous 1.72 (colored)

PANE_FREEZE doesn't do anything anymore, so remove it.

Revision 1.72 / (download) - annotate - [select for diffs], Wed May 18 20:24:29 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.71: +4 -1 lines
Diff to previous 1.71 (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.71 / (download) - annotate - [select for diffs], Wed May 18 18:06:36 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.70: +21 -1 lines
Diff to previous 1.70 (colored)

Add three new copy-mode commands - select-line, copy-line,
copy-end-of-line. From Dave Disser and Randy Stauner a while back.

Revision 1.70 / (download) - annotate - [select for diffs], Wed May 18 08:04:47 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.69: +4 -4 lines
Diff to previous 1.69 (colored)

Use button mouse mode not any for copy mode, fixes issues with
putty. From Ailin Nemui.

Revision 1.69 / (download) - annotate - [select for diffs], Sun Apr 24 21:06:12 2011 UTC (13 years ago) by nicm
Branch: MAIN
Changes since 1.68: +22 -8 lines
Diff to previous 1.68 (colored)

Tweak copy behaviour slightly in vi mode to be closer to real vi. From
Tiago Resende.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Apr 19 21:31:33 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.67: +18 -11 lines
Diff to previous 1.67 (colored)

When mode-mouse is on (it is off by default), automatically enter copy
mode when the mouse is dragged or the mouse wheel is used. Also exit
copy mode when the mouse wheel is scrolled off the bottom. Discussed
with and written by hsim at gmx dot li.

Revision 1.67 / (download) - annotate - [select for diffs], Mon Mar 28 19:44:31 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.66: +6 -6 lines
Diff to previous 1.66 (colored)

Style: uint -> u_int and a missing else.

Revision 1.66 / (download) - annotate - [select for diffs], Thu Dec 30 23:16:18 2010 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.65: +7 -7 lines
Diff to previous 1.65 (colored)

Change from a per-session stack of buffers to one global stack which is
much more convenient and also simplifies lot of code. This renders
copy-buffer useless and makes buffer-limit now a server option.

By Tiago Cunha.

Revision 1.65 / (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.64: +8 -6 lines
Diff to previous 1.64 (colored)

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

Revision 1.64 / (download) - annotate - [select for diffs], Sat Dec 11 17:56:01 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored)

Fix rectangle copy to behave like emacs - the cursor is not part of the
selection on the right edge but on the left it is.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Sep 11 15:39:55 2010 UTC (13 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.62: +3 -1 lines
Diff to previous 1.62 (colored)

When resizing the copy mode screen, don't allow it to end up with the
viewable position beyond the size of the history.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Sep 8 20:36:42 2010 UTC (13 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.61: +3 -1 lines
Diff to previous 1.61 (colored)

Do not crash if the screen size is too small for the indicator in copy mode.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jul 22 21:10:51 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.60: +5 -3 lines
Diff to previous 1.60 (colored)

Fix a crash: if remain-on-exit is set and the pane has exited, the
buffers may not be valid, so do not try to disable/enable them when
switching to copy mode.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Jun 29 05:24:49 2010 UTC (13 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.59: +6 -15 lines
Diff to previous 1.59 (colored)

replace some magic mouse constants with defines for clarity. ok nicm

Revision 1.59 / (download) - annotate - [select for diffs], Sun Jun 6 19:00:13 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.58: +4 -4 lines
Diff to previous 1.58 (colored)

Use a macro-based mask for obtaining a key or modifier-set from the
combination. Display C-@, etc, as C-Space, in list-keys. By Micah Cowan.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Jun 5 15:49:48 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.57: +12 -2 lines
Diff to previous 1.57 (colored)

Make start-of-line work the same as end-of-line on wrapped lines (jump
to real start if at edge of screen). By Micah Cowan.

Revision 1.57 / (download) - annotate - [select for diffs], Mon May 31 19:51:29 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.56: +49 -5 lines
Diff to previous 1.56 (colored)

When the mode-mouse option is on, support dragging to make a selection
in copy mode.

Also support the scroll wheel, although xterm strangely does not ignore
it in application mouse mode, causing redraw artifacts when scrolling up
(other terminals appear to be better behaved).

Revision 1.56 / (download) - annotate - [select for diffs], Sun May 23 19:42:19 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.55: +11 -13 lines
Diff to previous 1.55 (colored)

Pass in the session, rather than the client, to window modes' key()
function. We were only ever using the client to find the session anyway.

This allows send-key to work properly for manipulating copy mode from
outside tmux.

From Micah Cowan.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Apr 28 18:19:16 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.54: +3 -1 lines
Diff to previous 1.54 (colored)

Fix crash when resizing in copy mode, when cursor can end up outside screen.

Reported by Romain Francois, fixed by Micah Cowan.

Revision 1.54 / (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.53: +188 -71 lines
Diff to previous 1.53 (colored)

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

Revision 1.53 / (download) - annotate - [select for diffs], Mon Mar 22 19:13:28 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.52: +1 -1 lines
Diff to previous 1.52 (colored)

paste-buffer should be per pane, from C. Coutinho.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Mar 22 19:10:42 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.51: +119 -2 lines
Diff to previous 1.51 (colored)

Add vi-style "jump" commands for copy mode, from Micah Cowan.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Mar 14 23:31:23 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.50: +4 -4 lines
Diff to previous 1.50 (colored)

Fix a use-after-free when cancelling copy mode, or trying to repeat cancel.

ok kettenis

Revision 1.50 / (download) - annotate - [select for diffs], Tue Mar 2 00:32:41 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.49: +138 -46 lines
Diff to previous 1.49 (colored)

Permit keys in copy mode to be prefixed by a repeat count, entered with
[1-9] in vi mode, or M-[1-9] in emacs mode.

From Micah Cowan, tweaked a little by me.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Mar 1 23:53:27 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.48: +21 -4 lines
Diff to previous 1.48 (colored)

Extend the end-of-line key so that in normal mode a second press moves
the cursor to the end of a wrapped line (if present) and in rectangle
mode it toggles between the end of the text and the last cell on the
line.

From Micah Cowan.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Feb 22 20:41:16 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.47: +56 -38 lines
Diff to previous 1.47 (colored)

Option to set the characters considered word separators in copy mode, from
Micah Cowan.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Feb 22 20:28:21 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.46: +42 -13 lines
Diff to previous 1.46 (colored)

Another copy mode fix from Micah Cowan: in rectangle copy mode, the cursor
should not wrap at the end of the text on the line but should be allowed to
move freely.

Revision 1.46 / (download) - annotate - [select for diffs], Fri Feb 19 00:03:21 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.45: +7 -1 lines
Diff to previous 1.45 (colored)

copy mode uses the real screen as backing and if it is updated while copying,
strange things can happen. So, freeze reading from the pty while in copy mode.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Feb 17 21:27:18 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.44: +5 -6 lines
Diff to previous 1.44 (colored)

Make next-word stop at beginning of word even if it is at the start of the
line, from Micah Cowan.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Feb 17 20:58:24 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

Don't strip add newline if only copying part of wrapped line. Problem spotted
by and fix from Micah Cowan.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Feb 11 20:39:40 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.42: +13 -4 lines
Diff to previous 1.42 (colored)

Add "N" key to search the opposite way from the last search (reverse of "n"),
from Micah Cowan.

Revision 1.42 / (download) - annotate - [select for diffs], Sat Feb 6 17:35:01 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.41: +95 -19 lines
Diff to previous 1.41 (colored)

Rectangle copy support, from Robin Lee Powell.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Feb 4 20:00:26 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.40: +29 -24 lines
Diff to previous 1.40 (colored)

vi-style B, W and E keys in copy mode to navigate between words treating only
spaces as word separators. Also add . to the list of word separators for
standard word navigation.

From Micah Cowan, tweaked slightly by me.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Jan 27 20:18:52 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.39: +41 -1 lines
Diff to previous 1.39 (colored)

Alter next-word to have vi-like movement behaviour, and add next-word-end with
the existing emacs behaviour. From Micah Cowan.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Jan 25 22:34:11 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.38: +20 -44 lines
Diff to previous 1.38 (colored)

Hugely simplify window_copy_cursor_next_word, which was way overcomplicated.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Jan 25 21:37:40 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.37: +3 -1 lines
Diff to previous 1.37 (colored)

Update the selection properly after goto line or searching.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Jan 25 21:33:39 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.36: +15 -1 lines
Diff to previous 1.36 (colored)

Top/bottom of history mode keys, diff from Micah Cowan, tweaked by me.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Jan 24 21:05:12 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.35: +14 -5 lines
Diff to previous 1.35 (colored)

Redraw properly when scrolling backward and the cursor is on the last
line. Based on a fix from Micah Cowan.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Dec 3 22:50:10 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.34: +16 -16 lines
Diff to previous 1.34 (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.34 / (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.33: +2 -1 lines
Diff to previous 1.33 (colored)

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

Revision 1.33 / (download) - annotate - [select for diffs], Wed Nov 18 17:03:16 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.32: +1 -2 lines
Diff to previous 1.32 (colored)

Missed an unused variable :-/.

Revision 1.32 / (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.31: +8 -9 lines
Diff to previous 1.31 (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.31 / (download) - annotate - [select for diffs], Tue Oct 20 21:35:25 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.30: +7 -4 lines
Diff to previous 1.30 (colored)

Correctly nuke the EOL $ marker when scrolling, reported by martynas@, thanks.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Oct 13 13:45:56 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.29: +19 -1 lines
Diff to previous 1.29 (colored)

Add mode keys to move the cursor to the top, middle and bottom of the screen.
H/M/L in vi mode and M-R/M-r in emacs (bottom of screen not bound in emacs).

Revision 1.29 / (download) - annotate - [select for diffs], Sun Oct 11 07:01:10 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.28: +8 -8 lines
Diff to previous 1.28 (colored)

Clean up by introducing a wrapper struct for mouse clicks rather than passing
three u_chars around.

As a side-effect this fixes incorrectly rejecting high cursor positions
(because it was comparing them as signed char), reported by Tom Doherty.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Oct 6 07:09:00 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.27: +25 -15 lines
Diff to previous 1.27 (colored)

Make C-Up and C-Down in copy mode scroll the screen up and down one line
without moving the cursor, like Up and Down in scroll mode (which will shortly
disappear).

Revision 1.27 / (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.26: +9 -7 lines
Diff to previous 1.26 (colored)

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

Revision 1.26 / (download) - annotate - [select for diffs], Mon Sep 7 18:50:45 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.25: +8 -5 lines
Diff to previous 1.25 (colored)

Give each paste buffer a size member instead of requiring them to be
zero-terminated.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Aug 21 07:33:58 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.24: +19 -5 lines
Diff to previous 1.24 (colored)

When moving up or down in copy mode, save the cursor position and size of the
last line with content (width != 0) and use it to determine if the cursor
should be at the end of the line. Fixes problem of the cursor always jumping to
the end of the line when scrolling past a blank line.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Aug 19 14:46:56 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.23: +3 -1 lines
Diff to previous 1.23 (colored)

Don't read beyond the edge of the screen when searching (dies with debug
enabled).

Revision 1.23 / (download) - annotate - [select for diffs], Tue Aug 18 09:51:51 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.22: +1 -2 lines
Diff to previous 1.22 (colored)

Nuke unnecessary assignment.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Aug 18 07:23:43 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.21: +4 -1 lines
Diff to previous 1.21 (colored)

Add a "delete line" key when editing in the status line or the search up/down
prompt. C-u with emacs keys, d with vi.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Aug 18 07:08:26 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.20: +391 -15 lines
Diff to previous 1.20 (colored)

Add (naive) searching and goto line in copy mode. Searching is C-r and C-s with
emacs keys, / and ? with vi; n repeats the search again with either key
set. All searching wraps the top/bottom. Goto line is g for both emacs and vi.

The search prompts don't have full line editing, just simple append and delete
characters.

Also sort the mode keys list in tmux.1.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Aug 13 22:32:18 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.19: +19 -1 lines
Diff to previous 1.19 (colored)

vi(1)-style half page scroll in copy and scroll modes. Move the vi full page
scroll key to C-b instead of C-u and use C-u/C-d for half page scrolling with
vi keys. In emacs mode, half page scrolling is bound to M-Up and M-Down.

Suggested by merdely (about a year ago :-)).

Revision 1.19 / (download) - annotate - [select for diffs], Thu Aug 13 22:11:43 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.18: +13 -5 lines
Diff to previous 1.18 (colored)

Scroll by two less than the number of lines in the screen, like emacs, rather
than by the entire screen, to make it easier to pull things out from under the
line indicator. Suggested by claudio.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Aug 13 19:35:20 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.17: +69 -200 lines
Diff to previous 1.17 (colored)

Allowing copy mode to scroll left and right is annoying, so limit it to the
real screen width. To indicate the cursor is at the end of the line rather than
the cell before, put a '$' in the last cell.

Also clear the selection when the terminal is resized to avoid tmux getting
confused.

Revision 1.17 / (download) - annotate - [select for diffs], Thu Aug 13 16:48:43 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)

Redraw the screen after resizing.

Revision 1.16 / (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.15: +26 -12 lines
Diff to previous 1.15 (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.15 / (download) - annotate - [select for diffs], Sat Aug 8 13:29:27 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Change the way the grid is stored, previously it was:

- a two-dimensional array of cells;
- a two-dimensional array of utf8 data;
- an array of line lengths.

Now it is a single array of a new struct grid_line each of which represents a
line and containts the length and an array of cells and an array of utf8 data.

This will make it easier to add additional per-line members, such as flags.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Aug 5 16:26:38 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.13: +5 -5 lines
Diff to previous 1.13 (colored)

If colours are not supported by the terminal, try to emulate a coloured
background by setting or clearing the reverse attribute.

This makes a few applications which don't use the reverse attribute themselves
a little happier, and allows the status, message and mode options to have
default attributes and fg/bg options that work as expected when set as reverse.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Jul 30 07:04:50 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.12: +3 -2 lines
Diff to previous 1.12 (colored)

Add a mode-mouse option to prevent tmux taking over the mouse in choice or copy
modes.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Jul 28 07:03:32 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Next step towards customisable mode keys: build each default table of keys into
a named tree on start and use that for lookups. Also add command to string
translation tables and modify list-keys to show the the mode key bindings (new
-t argument).

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jul 27 20:36:13 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Remove an unused entry in the mode keys command enum and rename
MODEKEYCOPY_QUIT to _CANCEL to match the others.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jul 27 19:29:35 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.9: +22 -18 lines
Diff to previous 1.9 (colored)

Change mode key bindings from big switches into a set of tables. Rather than
lumping them all together, split editing keys from those used in choice/more
mode and those for copy/scroll mode.

Tidier and clearer, and the first step towards customisable mode keys.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jul 27 18:51:46 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.8: +1 -3 lines
Diff to previous 1.8 (colored)

Get rid of empty mode_key_free function.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Jul 27 07:42:45 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.7: +21 -36 lines
Diff to previous 1.7 (colored)

Change previous-word behavior to move to the beginning of the word (matches
emacs and vi). From Kalle Olavi Niemitalo.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jul 23 17:03:47 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.6: +2 -1 lines
Diff to previous 1.6 (colored)

Redraw after starting selection to correctly remove any existing selection.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jul 12 16:15:34 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.5: +32 -1 lines
Diff to previous 1.5 (colored)

Add a "back to indentation" key in copy mode to move the cursor to the first
non-whitespace character. ^ with vi and M-m with emacs key bindings. Another
from Kalle Olavi Niemitalo, thanks.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Jul 12 16:12:34 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.4: +36 -82 lines
Diff to previous 1.4 (colored)

Merge three copies of identical code to move the cursor x position into a
single function, from Kalle Olavi Niemitalo.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Jul 11 19:09:24 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.3: +9 -1 lines
Diff to previous 1.3 (colored)

Copy was using the real line length which after resize can be larger than the
screen width. When built with -DDEBUG, this made the grid bounds checking code
kill the server. Restrict copying to the actual width.

From Kalle Olavi Niemitalo, thanks.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jul 9 15:02:00 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

Stop in the right place so all the lines selected are copied. Reported by Kalle
Olavi Niemitalo, thanks.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jul 2 16:15:43 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

Fix two copy/paste bugs: forbid zero-length buffers to prevent a fatal error
when trying to paste them, found by me, and miscalculation of the start/end
causing random fatal errors when copying in copy-mode, reported by sthen.

ok sthen "put it in" deraadt

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.