nicm
4bc0a83d51
Need to check for pane redrawing even if just the window flag is set
...
(the pane flag may not have been previously set to avoid looping the
windows).
2020-04-20 06:07:39 +00:00
Thomas Adam
8c9bbc3749
Merge branch 'obsd-master'
2020-04-19 00:01:31 +01:00
nicm
62ff5e4b01
The PANE_REDRAW flag bit might be needed by other panes so we can't
...
clear it on the first redraw, and it can't be set when we are finished
or they would be redrawn again, so if the redraw is deferred for a
client, copy the redraw flag into a separate set of bits just for that
client.
2020-04-18 21:35:32 +00:00
Thomas Adam
e1799ed7c8
Merge branch 'obsd-master'
2020-04-18 10:01:31 +01:00
nicm
b0a37e7514
Bring back previons fix to only redraw panes that need it after a redraw
...
is deferred, but clear the pane flags when they are actually redrawn
rather than every time.
2020-04-18 07:32:53 +00:00
Thomas Adam
349617a818
Merge branch 'obsd-master'
2020-04-18 08:01:37 +01:00
nicm
baf1fca273
Only update mode when actually going to redraw something.
2020-04-18 06:52:36 +00:00
nicm
1d2bd864f2
Add a flag to protect against nested syncs and add some extra logging to
...
redrawing.
2020-04-18 06:20:50 +00:00
nicm
d94bdf7420
Revert previous, there is still a problem.
2020-04-18 06:15:07 +00:00
nicm
5289d4ed13
When a redraw is deferred because the terminal hasn't finished reading
...
the data from the last one, other panes could update while waiting, so
we set the flag to redraw them all when the new redraw actually
happened. But this means a lot of redrawing panes unnecessarily if they
haven't changed - so instead set a flag to say "at least one pane needs
to be redrawed" then look at the invidual pane flags to see which ones
need it.
2020-04-18 06:10:15 +00:00
Thomas Adam
87d79e6d36
Merge branch 'obsd-master'
2020-04-18 00:01:30 +01:00
nicm
a7a9460d27
Set mode properly before and after redrawing, and don't bother
...
calculating cursor position if it won't be used.
2020-04-17 22:16:28 +00:00
Thomas Adam
5e38d26257
Merge branch 'obsd-master'
2020-04-16 16:01:35 +01:00
nicm
5ec80bd249
Move the UTF-8 flag to terminal flags.
2020-04-16 14:25:35 +00:00
Thomas Adam
acc00cd13a
Merge branch 'obsd-master'
2020-04-13 18:01:43 +01:00
nicm
3f86d6d460
When adding a list of commands to the queue, instead of automatically
...
creating a new state for each group of commands, require the caller to
create one and use it for all the commands in the list. This means the
current target works even with list with multiple groups (which can
happen if they are defined with newlines).
2020-04-13 15:55:51 +00:00
nicm
adb76fd1ce
Move cmdq_state into cmd-queue.c.
2020-04-13 14:46:04 +00:00
Thomas Adam
8f2b5d714a
Merge branch 'obsd-master'
2020-04-13 14:01:45 +01:00
nicm
04cdd03525
Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make its
...
use more clearly defined and preparation for some future work).
2020-04-13 10:59:58 +00:00
Thomas Adam
52e3d960e7
Merge branch 'obsd-master'
2020-04-09 16:01:45 +01:00
nicm
b96ac80901
Some unnecessary assignments and unused variables.
2020-04-09 13:52:31 +00:00
Thomas Adam
916c3787d7
Merge branch 'obsd-master'
2020-04-09 14:01:32 +01:00
nicm
0e8710f507
Wait until the initial command sequence is done before sending a device
...
attributes request and other bits that prompt a reply from the terminal.
This means that stray relies are not left on the terminal if the command
has attached and then immediately detached and tmux will not be around
to receive them. Prompted by a problem report from espie@.
2020-04-09 12:16:16 +00:00
Thomas Adam
7e6db00dd2
Merge branch 'obsd-master'
2020-04-01 14:01:25 +01:00
nicm
05a15215c5
Do not ignore triple-click and send to pane.
2020-04-01 11:47:44 +00:00
Thomas Adam
dfd29977e0
Merge branch 'obsd-master'
2020-03-31 20:01:34 +01:00
nicm
cc8b41f294
Add a way to mark environment variables as "hidden" so they can be used
...
by tmux but are not passed into the environment of new panes.
2020-03-31 17:14:40 +00:00
Thomas Adam
0bb1a50b88
Merge branch 'obsd-master'
2020-03-31 16:01:29 +01:00
nicm
01b3bb8e2c
Add a "second click" key type which is fired for the second click of a
...
double click, even if the timer hasn't expired to confirm it isn't
actually a triple click. Provides a way for people who don't care about
triple clicks or can make their commands have no side effects to avoid
the double click timer delay.
2020-03-31 11:38:35 +00:00
Thomas Adam
c9cd8f9b5d
Merge branch 'obsd-master'
2020-03-31 10:01:29 +01:00
nicm
3bbd66c013
Move alternate screen into the screen rather than the pane.
2020-03-31 07:00:34 +00:00
Thomas Adam
8a57d14f4b
Merge branch 'obsd-master'
2020-03-26 11:11:37 +00:00
nicm
8a838b0372
Add support for overlay popup boxes to show text or output temporarily
...
above the normal layout. These work similarly to menus and are created
with the display-popup command.
2020-03-24 08:09:43 +00:00
Thomas Adam
0610f66fa9
Merge branch 'obsd-master'
2020-03-17 12:01:28 +00:00
nicm
115bb33257
Ignore default-shell (and use /bin/sh) if it invalid not just if it is
...
tmux itself, also refuse to set the option to something invalid in the
first place. GitHub issue 2120.
2020-03-17 11:10:12 +00:00
Thomas Adam
f584fe1b00
Merge branch 'obsd-master'
2020-03-16 08:01:27 +00:00
nicm
d162ff48f3
Send mouse down event immediately rather than waiting for double click
...
to finish which would now mean it was out of order. Reported by Mark
Kelly.
2020-03-16 06:12:42 +00:00
Thomas Adam
6385bd1e08
Merge branch 'obsd-master'
2020-03-12 14:01:29 +00:00
nicm
f7bc753442
Change how double and triple clicks works so that one or the other is
...
fired - a double click is no longer triggered on the way to a triple
click.
2020-03-12 13:16:16 +00:00
Thomas Adam
ba542e42b7
Merge branch 'obsd-master'
2020-02-19 16:01:27 +00:00
nicm
b20753f2a3
A few fixes to make modifier keys and dragging work - need to remove the
...
modifiers before checking for the dragging marker key, and apply them
before looking up the end key. Also fix key-to-string with modifiers for
special keys.
2020-02-19 14:25:00 +00:00
Thomas Adam
a4d8437bc2
Merge branch 'obsd-master'
2020-02-11 08:01:30 +00:00
nicm
dc882adb2e
Remove unused variables from Ben Boeckel, and a Pp from jmc.
2020-02-11 07:01:08 +00:00
Thomas Adam
7cdf5ee9bc
Merge branch 'obsd-master'
2020-01-28 10:01:25 +00:00
nicm
24350879cd
Add a define for flags meaning a client is not attached, and fix
...
unattached counter, reported by Thomas Sattler.
2020-01-28 08:06:11 +00:00
Thomas Adam
52b6ca5706
Merge branch 'obsd-master'
2019-12-16 18:01:31 +00:00
nicm
1bdd4828bd
If /dev/fd/X is a symlink and realpath() expands symlinks, /dev/fd/X
...
ends up pointing to the wrong place before it is passed to the client.
The path is only used internally so there is no real need for
realpath(), remove it and move the get_path function to file.c where all
the callers are.
2019-12-16 16:39:03 +00:00
nicm
eaa58d28dc
Instead of using large buffers in imsgs, add the data or path onto the end.
2019-12-16 15:48:50 +00:00
Thomas Adam
7922f4ee7b
Merge branch 'obsd-master'
2019-12-12 14:33:47 +00:00
nicm
c284ebe0ad
Rewrite the code for reading and writing files. Now, if the client is
...
not attached, the server process asks it to open the file, similar to
how works for stdin, stdout, stderr. This makes special files like
/dev/fd/X work (used by some shells). stdin, stdout and stderr and
control mode are now just special cases of the same mechanism. This will
also make it easier to use for other commands that read files such as
source-file.
2019-12-12 11:39:56 +00:00
Thomas Adam
875139f5fa
Merge branch 'obsd-master'
2019-12-03 12:01:26 +00:00
nicm
7826d40ff9
Style nits in function arguments.
2019-12-03 10:47:22 +00:00
Nicholas Marriott
3bb11ec484
Revert "add missing definition"
...
This reverts commit 743939ec84
.
2019-11-28 14:36:32 +00:00
Thomas Adam
743939ec84
add missing definition
2019-11-28 12:31:43 +00:00
Nicholas Marriott
e00730d149
Fix bad merge.
2019-11-28 12:30:43 +00:00
Thomas Adam
5f5f029e3b
Merge branch 'obsd-master'
2019-11-28 12:18:41 +00:00
nicm
bc5881c4d2
Long lines and spacing fixes.
2019-11-28 09:56:25 +00:00
nicm
2349b1dbef
Make a best effort to set xpixel and ypixel for each pane and add
...
formats for them.
2019-11-28 09:45:15 +00:00
Thomas Adam
4408df1e8a
Merge branch 'obsd-master'
2019-11-01 22:01:24 +00:00
nicm
bad95db878
Limit lazy resize to panes in attached sessions only - those in
...
unattached are likely to have been resized by something like
split-window where the user probably wants the resize to happen
immediately. GitHub issue 1963.
2019-11-01 20:26:21 +00:00
Thomas Adam
24ab1bc714
Merge branch 'obsd-master'
2019-09-19 12:01:30 +01:00
nicm
647887b794
Add a "latest" window-size option which tries to size windows based on
...
the most recently used client. From Tommie Gannert in GitHub issue 1869
based on earlier changes from me.
2019-09-19 09:02:30 +00:00
Thomas Adam
4fa1f961f3
Merge branch 'obsd-master'
2019-08-28 20:02:24 +01:00
nicm
df0334d3b3
The resize event was never deciding to actually resize the pane if there
...
was output in the pane faster than the timer would fire, so change how
it works to only defer the timer again if the pane was actually resized
within the last timer period. Reported by James Tai in GitHub issue
1880.
2019-08-28 07:34:32 +00:00
Thomas Adam
7e7c8faa34
Merge branch 'obsd-master'
2019-07-17 21:02:26 +01:00
nicm
9e7774bb96
Clear overlay on normal key press.
2019-07-17 17:46:51 +00:00
Thomas Adam
3a4cf62aa9
Merge branch 'obsd-master'
2019-07-06 23:02:26 +01:00
nicm
ddf53d6e4e
Correctly adjust mouse position if the status line is at the top and
...
more than one line. GitHub issue 1822.
2019-07-06 20:56:34 +00:00
Thomas Adam
be5af704ad
Merge branch 'obsd-master'
2019-07-02 23:02:26 +01:00
nicm
6a489fa7f6
Command prompt key presses need to avoid the command queue, GitHub issue
...
1817. Also a tmux.1 fix from jmc.
2019-07-02 20:09:19 +00:00
Thomas Adam
c4a9299956
Merge branch 'obsd-master'
2019-06-26 21:02:26 +01:00
nicm
87ea14328c
Pass keys that aren't 0-9 on to normal key processing when display-panes
...
is active (restores previous behaviour).
2019-06-26 18:28:31 +00:00
Thomas Adam
70775b3c28
Merge branch 'obsd-master'
2019-06-20 23:02:28 +01:00
nicm
97a317a656
Need to always check focus even if not current window.
2019-06-20 19:29:38 +00:00
Thomas Adam
03945276f7
Merge branch 'obsd-master'
2019-06-20 09:02:26 +01:00
nicm
ae541287d3
Expand command formats in %if and move the config file loading later (to
...
when the first client has identified) so all the client formats are
available, fixes problems reported by Thomas Sattler.
2019-06-20 06:51:36 +00:00
Thomas Adam
057c04e32a
Merge branch 'obsd-master'
2019-06-11 15:02:26 +01:00
nicm
1a9f9c09b4
Do not resize panes unless they are in an attached, active window. From
...
Morten M Neergaard in GitHub issue 1782.
2019-06-11 13:09:00 +00:00
Thomas Adam
e13c1e5320
Merge branch 'obsd-master'
2019-06-07 23:02:26 +01:00
nicm
e37f34facc
Do not load the config file if the server is exiting because it failed
...
to start, otherwise commands like lsk which start the server again can
end up looping infinitely. Also make the first client exit
correctly. Problem reported by Wael M Nasreddine.
2019-06-07 20:09:17 +00:00
Thomas Adam
463bd8abb9
Merge branch 'obsd-master'
2019-05-25 18:41:51 +01:00
nicm
f8d3d247d8
Merge cmd_list_parse into cmd-parse.y so it can use the new alias
...
processing code.
2019-05-25 07:18:20 +00:00
Thomas Adam
98ee93bde3
Merge branch 'obsd-master'
2019-05-20 15:02:40 +01:00
nicm
e128c7fcd8
Replace the various identical error callbacks with a single one in cmd-queue.c.
2019-05-20 11:46:06 +00:00
Thomas Adam
699d9d2fac
Merge branch 'obsd-master'
2019-05-12 21:02:27 +01:00
nicm
00f19b7f91
Fix some indentation and dead assignments.
2019-05-12 18:16:33 +00:00
Thomas Adam
4bc45fc95a
Merge branch 'obsd-master'
2019-05-08 21:02:25 +01:00
nicm
f9682d2e55
Add a flag to redraw only the overlay, and remove the overlay on resize.
2019-05-08 18:07:12 +00:00
Thomas Adam
b24d7d9c95
Merge branch 'obsd-master'
2019-05-07 23:02:30 +01:00
nicm
89db309e10
Move around the display-panes identify code to make it a bit more
...
generic and hide the display-panes specific bits into
cmd-display-panes.c.
2019-05-07 20:01:41 +00:00
Thomas Adam
d9767b8112
Merge branch 'obsd-master'
2019-05-07 13:02:27 +01:00
nicm
85a9c2f52b
Treat keys in identify mode (display-panes) specially and handle them
...
immediately rather than queuing them (the command can block the queue
which means they were not being seen until it finished which was too
late). Reported by denis@ and solene@, ok solene@.
2019-05-07 11:24:03 +00:00
Thomas Adam
d4177e954c
Merge branch 'obsd-master'
2019-05-03 23:02:28 +01:00
nicm
9f75635596
Allow panes to be empty (no command), output can be piped to them with
...
split-window or display-message -I.
2019-05-03 20:44:24 +00:00
Thomas Adam
4d505574dc
Merge branch 'obsd-master'
2019-05-03 21:02:26 +01:00
nicm
4097257bef
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.
2019-05-03 18:42:40 +00:00
Thomas Adam
a14512e23e
Merge branch 'obsd-master'
2019-05-03 19:02:27 +01:00
nicm
fc3d85e34b
Fix mouse positioning when the pane is not entirely visible.
2019-05-03 16:51:29 +00:00
Thomas Adam
fff85d854e
Merge branch 'obsd-master'
2019-05-03 17:04:11 +01:00
nicm
33298d6df6
Instead of processing keys all together, put them up on the client
...
command queue so they are ordered correctly with the commands that they
execute.
2019-05-03 14:51:30 +00:00