Commit Graph

  • 8fc34ca044 libgen.h. Nicholas Marriott 2009-06-25 16:49:02 +00:00
  • a9e3d5c56a More diff-to-OpenBSD reduction. Move a lot of compat stuff into compat.h. Nicholas Marriott 2009-06-25 16:47:00 +00:00
  • bb459beb03 Whitespace and more syncing. Nicholas Marriott 2009-06-25 16:34:50 +00:00
  • 8df98d1f5b Don't need linker magic anymore. Nicholas Marriott 2009-06-25 16:25:55 +00:00
  • 6cde05147e No more xmalloc-debug. Nicholas Marriott 2009-06-25 16:25:15 +00:00
  • 8565ae234b Fix rejects. Nicholas Marriott 2009-06-25 16:23:35 +00:00
  • 3eb1bfddd4 Sync this properly. Nicholas Marriott 2009-06-25 16:22:36 +00:00
  • a5830b9603 Restore $Id$ and add script to do so. Nicholas Marriott 2009-06-25 16:21:32 +00:00
  • f17a5f1e82 If getcwd() fails, use the user's home directory, or /, instead of failing with an error. Nicholas Marriott 2009-06-25 16:11:12 +00:00
  • bfa46e8f91 lines variable can be -1 (to be ignored), so should be signed. Found by lint. Nicholas Marriott 2009-06-25 16:10:18 +00:00
  • f0bcbcfa7f Remove error about using -L and -S together which was never displayed as logging wasn't yet enabled, was unnecessary, and contradicted the man page which says using -S will cause -L to be ignored. Nicholas Marriott 2009-06-25 16:09:38 +00:00
  • 1b9ac18565 tmux doesn't and won't need syslog logging, so remove it and some other unused functions found by lint. Nicholas Marriott 2009-06-25 16:09:25 +00:00
  • 582660bdf3 Miscellaneous unused functions, including one which was basically a duplicate. Found by lint. Nicholas Marriott 2009-06-25 16:09:11 +00:00
  • 62822b1848 Nuke unused buffer functions. Found by lint. Nicholas Marriott 2009-06-25 16:07:00 +00:00
  • abb5e36199 Unused prototypes. Found by lint, no binary change. Nicholas Marriott 2009-06-25 16:06:09 +00:00
  • 947fabc751 Unused variables. Found by lint, no binary change. Nicholas Marriott 2009-06-25 16:05:39 +00:00
  • a03ae97fbf Now that a UTF-8-capable puts function exists, use it for printing strings in choice/more modes - lines with UTF-8 now display properly in find-window results. Nicholas Marriott 2009-06-25 16:05:00 +00:00
  • 3ec8efc803 Fix a type mismatch warning in assignment. Nicholas Marriott 2009-06-25 16:04:43 +00:00
  • f7a9eb46fc Change find-window and monitor-content to use fnmatch(3). For convenience and compatibility, *s are implicitly added at the start and end of the pattern. Nicholas Marriott 2009-06-25 16:04:24 +00:00
  • 853ad68162 Add a dedicated function to convert a line into a string and use it to simplify the search window function. Nicholas Marriott 2009-06-25 16:02:37 +00:00
  • e6e1b45fa1 Change to match xterm's resizing behaviour, including pushing lines into the history from the top when reducing vertical size and pulling them again when increasing size. Nicholas Marriott 2009-06-25 16:02:10 +00:00
  • 944520b3a8 Make remain-on-exit work again when there is only one pane left, which was broken sometime during the pane/layout changes. Reported/tested by Iain Morgan, thanks. Nicholas Marriott 2009-06-25 16:01:42 +00:00
  • 942ea4267d Trying to predict the cursor position for UTF-8 output in the same way as for normal eight-bit output is wrong, separate it into a different function. Fixes spacing when mixing UTF-8 with some escape sequences, notably the way w3m does it. Nicholas Marriott 2009-06-25 16:01:26 +00:00
  • 245685433e Constify utf8_width() function argument. Nicholas Marriott 2009-06-25 16:00:50 +00:00
  • 7eff7f7629 If a pane is "zombified" (remain-on-exit flag), don't continue to queue key and mouse input for it (otherwise they are processed after respawn). Nicholas Marriott 2009-06-25 16:00:25 +00:00
  • cd5a4f4c35 LC_ALL overrides LC_CTYPE and LANG. Comment was correct but the code wrong. Pointed out by Hannah Schroeter, thanks. Nicholas Marriott 2009-06-25 16:00:02 +00:00
  • 7be69bfa03 Terminate cwd buffer before running xstrdup on it. Nicholas Marriott 2009-06-25 15:59:42 +00:00
  • 6f4600c533 Check the first of LC_CTYPE, LC_ALL and LANG, rather than just the last, when trying to decide about UTF-8, and use strcasestr. Reported by Geert Hendrickx. Nicholas Marriott 2009-06-25 15:59:27 +00:00
  • fbcee9f114 strdup the input to putenv to avoid in one case passing a string that is later freed and in the other const strings. Nicholas Marriott 2009-06-25 15:58:58 +00:00
  • 0e95769b43 Call setproctitle earlier in the client, and include the socket name. Makes it easier to match client to server in ps/pgrep when using several servers. Nicholas Marriott 2009-06-25 15:58:33 +00:00
  • b9155e835a Print a better message than '(null)' if no command is specified ("tmux \;"). Nicholas Marriott 2009-06-25 15:56:39 +00:00
  • f90450f854 Zero the password given to -U in the client as well. Nicholas Marriott 2009-06-25 15:56:25 +00:00
  • 418128bebc If the prompt is hidden or a password is sent with -U, zero it before freeing it. Nicholas Marriott 2009-06-25 15:55:34 +00:00
  • 63b38ef628 Implement the CBT (backward tab) sequence (\033[Z). Nicholas Marriott 2009-06-25 15:54:57 +00:00
  • 1b245388b5 Proper support for tab stops (\033H etc), using a bitstring(3). Makes another vttest test happy. Nicholas Marriott 2009-06-25 15:54:38 +00:00
  • cd71a13a14 Okay, so I screwed up when testing this, doh. Unbreak so that CAN/SUB actually do cancel the sequence, and tweak to make the code more clear. Nicholas Marriott 2009-06-25 15:54:03 +00:00
  • 4eed190649 Oops, CAN and SUB should abort the sequence (return to first state), not remain in the same state. Nicholas Marriott 2009-06-25 15:53:44 +00:00
  • c3c14817c9 More input compatibility love. Support C0 within escape sequences, and the C0 control character VT (vertical tab, \013), which is treated as LF like VT102. Makes another vttest happy. Nicholas Marriott 2009-06-25 15:52:59 +00:00
  • b8ec0c713f Support insert mode by using insert character to shift the cells before writing as normal. Nicholas Marriott 2009-06-25 15:52:12 +00:00
  • 93631b3ca7 Implement the DEC alignment test. With the last change this is enough for the first cursor test in vttest (in ports) to pass; it still shops a few more problems though. Nicholas Marriott 2009-06-25 15:51:54 +00:00
  • 49477de55c Fix some miscalculations when clearing to start of screen: the number of lines to the cursor is cy not cy - 1, and the current cursor cell should be included. Nicholas Marriott 2009-06-25 15:50:48 +00:00
  • dff949747c Use vis(3) instead of handrolled function. Nicholas Marriott 2009-06-25 15:50:03 +00:00
  • 7597cb6834 Pass window titles through vis(1). <0x20 is dropped anyway by the input state machine but top-bit-set nonprintables could cause trouble, and they are neater like this anyway. Nicholas Marriott 2009-06-25 15:49:27 +00:00
  • 4f2e5f8c50 Do not set the window title by default (make set-titles option default to off), wiping over the title is rude and annoying. Nicholas Marriott 2009-06-25 15:48:59 +00:00
  • 28bcf774e5 New session option, status-utf8, to control the interpretation of top-bit-set characters in status-left and status-right (if on, they are treated as UTF-8; otherwise passed through). Nicholas Marriott 2009-06-25 15:48:25 +00:00
  • 1e06ec41dc Add a UTF-8 aware string length function and make UTF-8 in status-left/status-right work properly. At the moment any top-bit-set characters are assumed to be UTF-8: a status-utf8 option to configure this will come shortly. Nicholas Marriott 2009-06-25 15:47:07 +00:00
  • 0828e06ad7 Nuke unused pane flag. Nicholas Marriott 2009-06-25 15:46:09 +00:00
  • d3d4bacd82 Cast char to u_char before passing to isalnum(). By ray Nicholas Marriott 2009-06-25 15:45:24 +00:00
  • 94f5ddb60c remove unused flag; while here, make usage's output fit on 80-column displays. Nicholas Marriott 2009-06-25 15:44:44 +00:00
  • 658659532a Use login shells by default. Nicholas Marriott 2009-06-25 15:44:03 +00:00
  • 6528d47ed8 Don't leak memory if multiple -f flags are given. From ray Nicholas Marriott 2009-06-25 15:42:35 +00:00
  • 5b3db7b56c Sync man page with OpenBSD. Nicholas Marriott 2009-06-25 15:30:29 +00:00
  • 3d7cf00359 Add missing -a flag. Nicholas Marriott 2009-06-25 15:29:34 +00:00
  • e2a0c5ad7a When swapping pane positions, swap the PANE_HIDDEN flag as well, otherwise tmux crashes when trying to find the new active pane. Nicholas Marriott 2009-06-25 15:28:08 +00:00
  • 32398b98a8 Sync to OpenBSD: fixes from ray@. Nicholas Marriott 2009-06-25 15:25:45 +00:00
  • e8c10f5b34 Use the pane flags not the window flags. Doh. Nicholas Marriott 2009-06-25 08:08:18 +00:00
  • 5050171f6b diagflags for diags okay nicm@ Marc Espie 2009-06-25 07:42:41 +00:00
  • dbbb297d5f If getcwd() fails, use the user's home directory, or /, instead of failing with an error. Nicholas Marriott 2009-06-25 06:54:32 +00:00
  • be17ac1eb2 lines variable can be -1 (to be ignored), so should be signed. Found by lint. Nicholas Marriott 2009-06-25 06:48:23 +00:00
  • 40c242a6d5 Remove error about using -L and -S together which was never displayed as logging wasn't yet enabled, was unnecessary, and contradicted the man page which says using -S will cause -L to be ignored. Nicholas Marriott 2009-06-25 06:40:25 +00:00
  • a7075f1c66 tmux doesn't and won't need syslog logging, so remove it and some other unused functions found by lint. Nicholas Marriott 2009-06-25 06:23:10 +00:00
  • 1675ddb4d1 Miscellaneous unused functions, including one which was basically a duplicate. Found by lint. Nicholas Marriott 2009-06-25 06:15:04 +00:00
  • ed8350422e Nuke unused buffer functions. Found by lint. Nicholas Marriott 2009-06-25 06:05:47 +00:00
  • 9144d30848 Unused prototypes. Found by lint, no binary change. Nicholas Marriott 2009-06-25 06:00:45 +00:00
  • 83078bdcbc Unused variables. Found by lint, no binary change. Nicholas Marriott 2009-06-25 05:56:44 +00:00
  • 74d0851ac5 Remove some cruft from the Makefile. Nicholas Marriott 2009-06-24 23:32:18 +00:00
  • 23326e40cf Now that a UTF-8-capable puts function exists, use it for printing strings in choice/more modes - lines with UTF-8 now display properly in find-window results. Nicholas Marriott 2009-06-24 23:00:31 +00:00
  • 3db2433448 Fix a type mismatch warning in assignment. Nicholas Marriott 2009-06-24 22:51:47 +00:00
  • 7e796dea03 Change find-window and monitor-content to use fnmatch(3). For convenience and compatibility, *s are implicitly added at the start and end of the pattern. Nicholas Marriott 2009-06-24 22:49:56 +00:00
  • 096cbf2ea5 Add a dedicated function to convert a line into a string and use it to simplify the search window function. Nicholas Marriott 2009-06-24 22:04:18 +00:00
  • f4b8f00255 Change to match xterm's resizing behaviour, including pushing lines into the history from the top when reducing vertical size and pulling them again when increasing size. Nicholas Marriott 2009-06-24 19:12:44 +00:00
  • da8401d8be Make remain-on-exit work again when there is only one pane left, which was broken sometime during the pane/layout changes. Reported/tested by Iain Morgan, thanks. Nicholas Marriott 2009-06-24 17:36:15 +00:00
  • 0fdd47660a UTF-8 detection is broken on sparc64; disable until I get time to test it further. Nicholas Marriott 2009-06-24 17:31:03 +00:00
  • 2de599ac0e Trying to predict the cursor position for UTF-8 output in the same way as for normal eight-bit output is wrong, separate it into a different function. Fixes spacing when mixing UTF-8 with some escape sequences, notably the way w3m does it. Nicholas Marriott 2009-06-24 16:01:02 +00:00
  • 7b4077ef87 tweak previous; Jason McIntyre 2009-06-24 08:13:22 +00:00
  • 27cfa81110 Constify utf8_width() function argument. Nicholas Marriott 2009-06-24 05:35:07 +00:00
  • 013b88dfc3 Mention LC_ALL, LC_CTYPE. Nicholas Marriott 2009-06-23 23:26:08 +00:00
  • 6d2830a473 Add some common config file examples to the quick start section. Nicholas Marriott 2009-06-23 22:13:11 +00:00
  • 69f3c24647 If a pane is "zombified" (remain-on-exit flag), don't continue to queue key and mouse input for it (otherwise they are processed after respawn). Nicholas Marriott 2009-06-23 20:17:30 +00:00
  • c2b0fdae5b LC_ALL overrides LC_CTYPE and LANG. Comment was correct but the code wrong. Pointed out by Hannah Schroeter, thanks. Nicholas Marriott 2009-06-23 18:27:40 +00:00
  • 89262c62fe Terminate cwd buffer before running xstrdup on it. Nicholas Marriott 2009-06-05 11:14:13 +00:00
  • 18665b8cc9 Check the first of LC_CTYPE, LC_ALL and LANG, rather than just the last, when trying to decide about UTF-8, and use strcasestr. Reported by Geert Hendrickx. Nicholas Marriott 2009-06-05 07:22:23 +00:00
  • a3c32841e6 strdup the input to putenv to avoid in one case passing a string that is later freed and in the other const strings. Nicholas Marriott 2009-06-05 07:18:37 +00:00
  • 1156467726 Call setproctitle earlier in the client, and include the socket name. Makes it easier to match client to server in ps/pgrep when using several servers. Nicholas Marriott 2009-06-05 07:15:58 +00:00
  • 74749e8705 Remove trailing newlines, spaces, and tabs. Ray Lai 2009-06-05 03:13:16 +00:00
  • 85e0d8a221 Print a better message than '(null)' if no command is specified ("tmux \;"). Nicholas Marriott 2009-06-04 23:34:32 +00:00
  • 38b2c42f63 Zero the password given to -U in the client as well. Nicholas Marriott 2009-06-04 21:56:14 +00:00
  • 50bd094856 If the prompt is hidden or a password is sent with -U, zero it before freeing it. Nicholas Marriott 2009-06-04 21:43:24 +00:00
  • f031975dc0 Implement the CBT (backward tab) sequence (\033[Z). Nicholas Marriott 2009-06-04 21:02:21 +00:00
  • d42fb43f4f Proper support for tab stops (\033H etc), using a bitstring(3). Makes another vttest test happy. Nicholas Marriott 2009-06-04 18:48:24 +00:00
  • d6015824dd Okay, so I screwed up when testing this, doh. Unbreak so that CAN/SUB actually do cancel the sequence, and tweak to make the code more clear. Nicholas Marriott 2009-06-04 14:42:14 +00:00
  • 6c1f03578d Oops, CAN and SUB should abort the sequence (return to first state), not remain in the same state. Nicholas Marriott 2009-06-04 14:24:49 +00:00
  • 8dd2f0da3f More input compatibility love. Support C0 within escape sequences, and the C0 control character VT (vertical tab, \013), which is treated as LF like VT102. Makes another vttest happy. Nicholas Marriott 2009-06-04 14:15:50 +00:00
  • 0ba85cc326 zap trailing whitespace; Jason McIntyre 2009-06-04 13:36:25 +00:00
  • c1a4c0186a Support insert mode by using insert character to shift the cells before writing as normal. Nicholas Marriott 2009-06-03 23:37:30 +00:00
  • 52ec9b9ec4 Implement the DEC alignment test. With the last change this is enough for the first cursor test in vttest (in ports) to pass; it still shops a few more problems though. Nicholas Marriott 2009-06-03 23:30:40 +00:00
  • ebe07c2726 Fix some miscalculations when clearing to start of screen: the number of lines to the cursor is cy not cy - 1, and the current cursor cell should be included. Nicholas Marriott 2009-06-03 23:26:56 +00:00
  • 3f16fcb30a Use vis(3) instead of handrolled function. Nicholas Marriott 2009-06-03 19:37:27 +00:00
  • 2faec76afa Pass window titles through vis(1). <0x20 is dropped anyway by the input state machine but top-bit-set nonprintables could cause trouble, and they are neater like this anyway. Nicholas Marriott 2009-06-03 19:33:04 +00:00
  • 6208128fa2 Sync with private copy. Nicholas Marriott 2009-06-03 17:52:29 +00:00