OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.29 / (download) - annotate - [select for diffs], Sat May 16 15:34:08 2020 UTC (4 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, HEAD
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (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.28 / (download) - annotate - [select for diffs], Tue Mar 12 20:02:47 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

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

Revision 1.27 / (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.26: +5 -2 lines
Diff to previous 1.26 (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.26 / (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.25: +26 -23 lines
Diff to previous 1.25 (colored)

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

Revision 1.25 / (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.24: +5 -4 lines
Diff to previous 1.24 (colored)

Pass window into mode functions.

Revision 1.24 / (download) - annotate - [select for diffs], Tue May 30 21:44:59 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.23: +5 -3 lines
Diff to previous 1.23 (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.23 / (download) - annotate - [select for diffs], Sun May 7 22:27:57 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.22: +3 -1 lines
Diff to previous 1.22 (colored)

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

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

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

Revision 1.21 / (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.20: +2 -2 lines
Diff to previous 1.20 (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.20 / (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.19: +5 -5 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Mon Oct 10 21:51:39 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.18: +14 -14 lines
Diff to previous 1.18 (colored)

Add static in cmd-* and fix a few other nits.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jul 15 00:42:56 2016 UTC (7 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

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

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

I no longer use my SourceForge address so replace it.

Revision 1.16 / (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.15: +5 -5 lines
Diff to previous 1.15 (colored)

Use __unused rather than rolling our own.

Revision 1.15 / (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.14: +4 -3 lines
Diff to previous 1.14 (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.14 / (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.13: +3 -3 lines
Diff to previous 1.13 (colored)

Move struct options into options.c.

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

Remove some extra blank lines.

Revision 1.12 / (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.11: +31 -21 lines
Diff to previous 1.11 (colored)

Give clock mode its own timer.

Revision 1.11 / (download) - annotate - [select for diffs], Sun Apr 19 21:34:21 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.10: +5 -5 lines
Diff to previous 1.10 (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.10 / (download) - annotate - [select for diffs], Mon Mar 31 21:34:08 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.9: +142 -3 lines
Diff to previous 1.9 (colored)

Having three *clock* files is ridiculous, remove clock.c.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Mar 22 10:31:22 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.8: +1 -2 lines
Diff to previous 1.8 (colored)

No more lint means no more ARGSUSED.

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

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

Revision 1.7 / (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.6: +3 -2 lines
Diff to previous 1.6 (colored)

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

Revision 1.6 / (download) - annotate - [select for diffs], Sun May 23 19:42:19 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (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.5 / (download) - annotate - [select for diffs], Thu Dec 3 22:50:10 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (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.4 / (download) - annotate - [select for diffs], Thu Nov 26 23:13:47 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.3: +2 -3 lines
Diff to previous 1.3 (colored)

This doesn't need to be u_int.

Revision 1.3 / (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.2: +2 -1 lines
Diff to previous 1.2 (colored)

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

Revision 1.2 / (download) - annotate - [select for diffs], Sat Jun 27 14:40:22 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.1: +5 -5 lines
Diff to previous 1.1 (colored)

Use gmtime_r so the current time isn't overwritten, the minute comparison works
and the clock is actually updated. It was already used for lock-server but not
here.

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.