apply cursor hack, config
Iris Lightshard nilix@nilfm.cc
apply scrollback patches
Iris Lightshard nilix@nilfm.cc
fix buffer overflow when handling long composed input To reproduce the issue: " If you already have the multi-key enabled on your system, then add this line to your ~/.XCompose file: [...] <question> <T> <E> <S> <T> <question> : "1234567890123456789012345678901234567890123456789012345678901234567890" " Reported by and an initial patch by Andy Gozas <andy@gozas.me>, thanks! Adapted the patch, for now st (like dmenu) handles a fixed amount of composed characters, or otherwise ignores it. This is done for simplicity sake.
Hiltjo Posthuma hiltjo@codemadness.org
bump version to 0.9
Hiltjo Posthuma hiltjo@codemadness.org
FAQ: document the color emojis crash issue which affected some systems is fixed It is fixed in libXft 2.3.6: https://gitlab.freedesktop.org/xorg/lib/libxft/-/blob/libXft-2.3.5/NEWS
Hiltjo Posthuma hiltjo@codemadness.org
st: use `void' to indicate an empty parameter list
Tom Schwindl schwindl@posteo.de
Makefile: add manual path for OpenBSD
Hiltjo Posthuma hiltjo@codemadness.org
code-golfing: cleanup osc color related code * adds missing function prototype * move xgetcolor() prototype to win.h (that's where all the other x.c func prototype seems to be declared at) * check for snprintf error/truncation * reduces code duplication for osc 10/11/12 * unify osc_color_response() and osc4_color_response() into a single function the latter two was suggested by Quentin Rameau in his patch review on the hackers list.
NRK nrk@disroot.org
base64_digits: reduce scope, implicit zero, +1 size the array is not accessed outside of base64dec() so it makes sense to limit it's scope to the related function. the static-storage duration of the array is kept intact. this also removes unnecessary explicit zeroing from the start and end of the array. anything that wasn't explicitly zero-ed will now be implicitly zero-ed instead. the validity of the new array can be easily confirmed via running this trivial loop: for (int i = 0; i < 255; ++i) assert(base64_digits[i] == base64_digits_old[i]); lastly, as pointed out by Roberto, the array needs to have 256 elements in order to able access it as any unsigned char as an index; the previous array had 255. however, this array will only be accessed at indexes which are isprint() || '=' (see `base64dec_getc()`), so reducing the size of the array to the highest printable ascii char (127 AFAIK) + 1 might also be a valid strategy.
NRK nrk@disroot.org
avoid potential UB when using isprint() all the ctype.h functions' argument must be representable as an unsigned char or as EOF, otherwise the behavior is undefined.
NRK nrk@disroot.org
make underlines and strikethroughs respect `chscale`
Zacchary Dempsey-Plante zacc@ztdp.ca
Delay redrawals on palette changes Build on auto-sync and only mark window dirty on palette changes and let the event handler do the actual draw.
Santtu Lakkala inz@inz.fi
X10/SGR mouse: use alt as meta key instead of super/windows key
Hiltjo Posthuma hiltjo@codemadness.org
LICENSE: bump year
Hiltjo Posthuma hiltjo@codemadness.org
Fix mousereport This patch replaces the previous one I sent. The following changes are made in this patch: - Fix tracking of pressed buttons. Previously, pressing two buttons and then releasing one would make st think no buttons are pressed, which in particular broke MODE_MOUSEMOTION. - Always send the lowest-numbered pressed button on motion events; when no button is pressed for a motion event in MODE_MOUSEMANY, then send a release. This matches the behaviour of xterm. (Previously, st sent the most recently pressed button in the motion report.) - Remove UB (?) access to potentially inactive struct member e->xbutton.button of XEvent union. - Fix (unlikely) possibility of overflow for large button numbers. The one discrepancy I found between st and xterm is that xterm sometimes encodes buttons with large numbers (>5) strangely. E.g., xterm reports presses of buttons 8 and 9 as releases, whereas st properly (?) encodes them as presses.
bump version to 0.8.5
Hiltjo Posthuma hiltjo@codemadness.org
FAQ: fix a typo, patch -> path
Hiltjo Posthuma hiltjo@codemadness.org
Fix overtyping wide characters. Overtyping the first half of a wide character with the second half of a wide character results in display garbage. This is because the trailing dummy is not cleaned up. i.e. ATTR_WIDE, ATTR_WDUMMY, ATTR_WDUMMY Here is a short script for demonstrating the behavior: #!/bin/sh alias printf=/usr/bin/printf printf こんにちは!; sleep 2 printf '\x1b[5D'; sleep 2 printf へ; sleep 2 printf ' '; sleep 2 echo
jamin acdimalev@gmail.com
Fix null pointer access in strhandle According to the spec the argument is optional for 104, so p can be NULL as can be tested with printf '\x1b]104\x07'. This is a regression of 8e31030.
Jochen Sprickerhof git@jochen.sprickerhof.de
follow-up fix for OSC color sequences, return Otherwise the message "erresc: unknown str" is printed.
Hiltjo Posthuma hiltjo@codemadness.org
Add support for OSC color sequences
Raheman Vaiya r.vaiya@gmail.com
fix possible rare crash when Xutf8TextPropertyToTextList fails from the XmbTextListToTextProperty(3) man page: "If insufficient memory is available for the new value string, the functions return XNoMemory. If the current locale is not supported, the functions return XLocaleNotSupported. In both of these error cases, the functions do not set text_prop_return." Reported by Steffen Nurpmeso <steffen@sdaoden.eu>, thanks!
Hiltjo Posthuma hiltjo@codemadness.org
fix a problem that the standard streams are unexpectedly closed In the current implementation, the slave PTY (assigned to the variable `s') is always closed after duplicating it to file descriptors of standard streams (0, 1, and 2). However, when the allocated slave PTY `s' is already one of 0, 1, or 2, this causes unexpected closing of a standard stream. The same problem occurs when the file descriptor of the master PTY (the variable `m') is one of 0, 1, or 2. In this patch, the original master PTY (m) is closed before it would be overwritten by duplicated slave PTYs. The original slave PTY (s) is closed only when it is not one of the stanrad streams.
Koichi Murase myoga.murase@gmail.com
Add 14th bit to XK_SWITCH_MOD bitmask The bits of uint signal in an XKeyEvent which concern the key group (keyboard layout) are bits 13 and 14, as documented here: https://www.x.org/releases/X11R7.7/doc/libX11/XKB/xkblib.html#Groups_and_Shift_Levels In the older version, only bit 13 was marked as part of XK_SWITCH_MOD, this causes issues for users who have more than two keymaps. the 14th bit is not in ignoremod, key sequences are not caught by match(), if they switch to a third or fourth keyboard.
Petar Kapriš petarkapris@firemail.cc
Mild const-correctness improvements. Only touch a few things, the main focus is to improve code readability.
Markus F.X.J. Oberhumer markus@oberhumer.com
fix: correctly encode mouse buttons >= 8 in X10 and SGR mode These are typically mapped in X11 to the side-buttons (backward/forwards) on the mouse. A comparison of the button numbers in SGR mode (first field): st old: 0 1 2 64 65 66 67 68 69 70 st new (it is the same as xterm now): 0 1 2 64 65 66 67 128 129 130 A script to test and reproduce it, first argument is "h" (on) or "l" (off): #!/bin/sh printf '\x1b[?1000%s\x1b[?1006%s' "$1" "$1" for n in 1 2 3 4 5 6 7 8 9 10; do printf 'button %d\n' "$n" xdotool click "$n" printf '\n\n' done
Hiltjo Posthuma hiltjo@codemadness.org
remove unused variable from previous patch
Hiltjo Posthuma hiltjo@codemadness.org
ST: Add WM_ICON_NAME property support Also added _NET_WM_ICON_NAME.
John Collis john.collis@alliedtelesis.co.nz
bump version to 0.8.4
Hiltjo Posthuma hiltjo@codemadness.org
config.mk: use PKG_CONFIG in commented OpenBSD section
Hiltjo Posthuma hiltjo@codemadness.org
LICENSE: bump years
Hiltjo Posthuma hiltjo@codemadness.org
remove sixel stub code Remove stub code that was used for an experiment of adding sixel code to st from the commit f7398434.
Hiltjo Posthuma hiltjo@codemadness.org
fix unicode glitch in DCS strings, patch by Tim Allen Reported on the mailinglist: " I discovered recently that if an application running inside st tries to send a DCS string, subsequent Unicode characters get messed up. For example, consider the following test-case: printf '\303\277\033P\033\\\303\277' ...where: - \303\277 is the UTF-8 encoding of U+00FF LATIN SMALL LETTER Y WITH DIAERESIS (ÿ). - \033P is ESC P, the token that begins a DCS string. - \033\\ is ESC \, a token that ends a DCS string. - \303\277 is the same ÿ character again. If I run the above command in a VTE-based terminal, or xterm, or QTerminal, or pterm (PuTTY), I get the output: ÿÿ ...which is to say, the empty DCS string is ignored. However, if I run that command inside st (as of commit 9ba7ecf), I get: ÿÿ ...where those last two characters are \303\277 interpreted as ISO8859-1 characters, instead of UTF-8. I spent some time tracing through the state machines in st.c, and so far as I can tell, this is how it works currently: - ESC P sets the "ESC_DCS" and "ESC_STR" flags, indicating that incoming bytes should be collected into the strescseq buffer, rather than being interpreted. - ESC \ sets the "ESC_STR_END" flag (when ESC is received), and then calls strhandle() (when \ is received) to interpret the collected bytes. - If the collected bytes begin with 'P' (i.e. if this was a DCS string) strhandle() sets the "ESC_DCS" flag again, confusing the state machine. If my understanding is correct, fixing the problem should be as easy as removing the line that sets ESC_DCS from strhandle(): diff --git a/st.c b/st.c index ef8abd5..b5b805a 100644 --- a/st.c +++ b/st.c @@ -1897,7 +1897,6 @@ strhandle(void) xsettitle(strescseq.args[0]); return; case 'P': /* DCS -- Device Control String */ - term.mode |= ESC_DCS; case '_': /* APC -- Application Program Command */ case '^': /* PM -- Privacy Message */ return; I've tried the above patch and it fixes my problem, but I don't know if it introduces any others. "
Hiltjo Posthuma hiltjo@codemadness.org
FAQ: fix single-buffer patch rebase against master
Hiltjo Posthuma hiltjo@codemadness.org
config.def.h: add an option allowwindowops, by default off (secure) Similar to the xterm AllowWindowOps option, this is an option to allow or disallow certain (non-interactive) operations that can be insecure or exploited. NOTE: xsettitle() is not guarded by this because st does not support printing the window title. Else this could be exploitable (arbitrary code execution). Similar problems have been found in the past in other terminal emulators. The sequence for base64-encoded clipboard copy is now guarded because it allows a sequence written to the terminal to manipulate the clipboard of the running user non-interactively, for example: printf '\x1b]52;0;ZWNobyBoaQ0=\a'
Hiltjo Posthuma hiltjo@codemadness.org
FAQ: add some details about the w3m img hack ... and an example patch to switch from double-buffering to a single buffer.
Hiltjo Posthuma hiltjo@codemadness.org
tiny style fix
Hiltjo Posthuma hiltjo@codemadness.org
Partially add back in "support REP (repeat) escape sequence" Add the functionality back in for xterm compatibility, but do not expose the capability in st.info (yet). Some notes: It was reverted because it caused some issues with ncurses in some configurations, namely when using BSD padding (--enable-bsdpad, BSD_TPUTS) in ncurses it caused issues with repeating digits. A fix has been upstreamed in ncurses since snapshot 20200523. The fix is also backported to OpenBSD -current.
Hiltjo Posthuma hiltjo@codemadness.org
Call xsetcursor to set win.cursor in main In xsetcursor, remove "DEFAULT(cursor, 1)" because 0 is a valid value. Increase max allowed value of cursor from 6 to 7 (st extension).
Steve Ward planet36@gmail.com
Revert "support REP (repeat) escape sequence" This reverts commit e8392b282c2eaa28725241a9612804fb55113da4. There is currently a bug in older ncurses versions (like on OpenBSD) where a fix for a bug with REP is not backported yet. Most likely in tty/tty_update.c: Noticed while using lynx (which uses ncurses/curses). To reproduce using lynx: echo "Z0000000" | lynx -stdin or using the program: int main(void) { WINDOW *win; win = initscr(); printw("Z0000000"); refresh(); sleep(5); return 0; } This prints "ZZZZZZZ" (incorrectly).
Hiltjo Posthuma hiltjo@codemadness.org
support REP (repeat) escape sequence The sequence \e[Nb prints the last printed char N (more) times if it's printable, and it's ignored after newline or other control chars. This is Ecma-048/ANSI-X3.6 sequence and not DEC VT. It's supported by xterm, and ncurses uses it when possible, e.g. when TERM is xterm* (and with this commit also st*). xterm supports only codepoints<=255, possibly due to internal limits. We support any value/codepoint which was placed in a cell. To test: - tput rep 65 4 -> prints 'AAAA' - printf "\342\225\246\033[4b" -> prints U+2566 1+4 times.
Avi Halachmi (:avih) avihpit@yahoo.com
Add rin terminfo capability Tianlin Qu discovered that st is missing rin (scroll back #1 lines).
Roberto E. Vargas k0ga@shike2.com
Make shift+wheel behaves as shift+Prev/Next St uses a very good hack where mouse wheel genereates ^Y and ^E, that are the same keys that less and vi uses for backward and fordward scrolling. Scroll, as many terminal emulators, use shift+Prev/Next for scrolling, but it is also using ^E and ^Y for scroling, characters that are reserved in the POSIX shell in emacs mode for end of line and yanking, making scroll unsable in st. This patch adds a new hack, making shift+wheel returning the same sequences than shift+Prev/Next, meaning that scroll or any other similar program will not be able to differentiate between them.
k0ga k0ga@shike2.com
Fix selection: selscroll
Jakub Leszczak szatan@gecc.xyz
Fix selection: ignore ATTR_WRAP when rectangular selection in getsel
Jakub Leszczak szatan@gecc.xyz
Fix selection: selclear in tputc
Jakub Leszczak szatan@gecc.xyz
code-style: add fallthrough comment Patch by Steve Ward, thanks.
Hiltjo Posthuma hiltjo@codemadness.org
optimize column width calculation and utf-8 encode for ASCII In particular on OpenBSD and on glibc wcwidth() is quite expensive. On musl there is little difference.
Hiltjo Posthuma hiltjo@codemadness.org
fix for incorrect (partial) written sequences when libc wcwidth() == -1 Fix an issue with incorrect (partial) written sequences when libc wcwidth() == -1. The sequence is updated to on wcwidth(u) == -1: c = "\357\277\275" but len isn't. A way to reproduce in practise: * st -o dump.txt * In the terminal: printf '\xcd\xb8' - This is codepoint 888, on OpenBSD it reports wcwidth() == -1. - Quit the terminal. - Look in dump.txt (partial written sequence of "UTF_INVALID"). This was introduced in: " commit 11625c7166b7e4dad414606227acec2de1c36464 Author: czarkoff@gmail.com <czarkoff@gmail.com> Date: Tue Oct 28 12:55:28 2014 +0100 Replace character with U+FFFD if wcwidth() is -1 Helpful when new Unicode codepoints are not recognized by libc." Change: Remove setting the sequence. If this happens to break something, another solution could be setting len = 3 for the sequence.
Hiltjo Posthuma hiltjo@codemadness.org
tiny code-style and typo-fix in comment
Hiltjo Posthuma hiltjo@codemadness.org
auto-sync: draw on idle to avoid flicker/tearing st could easily tear/flicker with animation or other unattended output. This commit eliminates most of the tear/flicker. Before this commit, the display timing had two "modes": - Interactively, st was waiting fixed `1000/xfps` ms after forwarding the kb/mouse event to the application and before drawing. - Unattended, and specifically with animations, the draw frequency was throttled to `actionfps`. Animation at a higher rate would throttle and likely tear, and at lower rates it was tearing big frames (specifically, when one `read` didn't get a full "frame"). The interactive behavior was decent, but it was impossible to get good unattended-draw behavior even with carefully chosen configuration. This commit changes the behavior such that it draws on idle instead of using fixed latency/frequency. This means that it tries to draw only when it's very likely that the application has completed its output (or after some duration without idle), so it mostly succeeds to avoid tear, flicker, and partial drawing. The config values minlatency/maxlatency replace xfps/actionfps and define the range which the algorithm is allowed to wait from the initial draw-trigger until the actual draw. The range enables the flexibility to choose when to draw - when least likely to flicker. It also unifies the interactive and unattended behavior and config values, which makes the code simpler as well - without sacrificing latency during interactive use, because typically interactively idle arrives very quickly, so the wait is typically minlatency. While it only slighly improves interactive behavior, for animations and other unattended-drawing it improves greatly, as it effectively adapts to any [animation] output rate without tearing, throttling, redundant drawing, or unnecessary delays (sounds impossible, but it works).
Avi Halachmi (:avih) avihpit@yahoo.com
replace exit(3) by _exit(2) in signal handler sigchld() exit(3) is not async-signal-safe but, _exit(2) is. This change prevents st to crash and dump core.
Jan Klemkow j.klemkow@wemelug.de
bump version to 0.8.3
Hiltjo Posthuma hiltjo@codemadness.org
Update XIM cursor position only if changed Updating XIM cursor position is expensive, so only update it when cursor position changed.
Ivan Tham pickfire@riseup.net
just remove the EOF message
Hiltjo Posthuma hiltjo@codemadness.org
Add st-mono terminfo entry This entry is intended for monocolor display and it is very helpful for color haters.
Roberto E. Vargas Caballero k0ga@shike2.com
config.def.h: add a comment for the scroll variable
Hiltjo Posthuma hiltjo@codemadness.org
Fix small typos
Hiltjo Posthuma hiltjo@codemadness.org
Launch scroll program with the default shell
Quentin Rameau quinq@fifth.space
Update FAQ with the last modifications
Roberto E. Vargas Caballero k0ga@shike2.com
Add terminfo entries for backspace mode St used to use backspace as BS until the commit 230d0c8, but due to general lack of knowledge of lusers, we moved to the most common configuration in linux to avoid answering the same question 3 times per month. With the most common configuration we have a backspace that returns a DEL, and we have a Delete key that doesn't return a DEL character neither a BS. When dealing with devices connected using a serial line (or even with Plan9) it is more common Backspace as BS and Delete as DEL. For this reason, st is not always the best tool when you talk with a serial device. This patch adds new terminfo entries for Backspace as BS and Delete as DEL. A patch for confg.h is also added, to make easier switch between both configurations.
Roberto E. Vargas Caballero k0ga@shike2.com
Fix style issue
Roberto E. Vargas Caballero k0ga@shike2.com
ttyread: test for EOF while reading tty When a read operation returns 0 then it means that we arrived to the end of the file, and new reads will return 0 unless you do some other operation such as lseek(). This case happens with USB-232 adapters when they are unplugged.
Roberto E. Vargas Caballero k0ga@shike2.com
Add support for scroll(1) Scroll is a program that stores all the lines of its child and be used in st as a way of implementing scrollback. This solution is much better than implementing the scrollback in st itself because having a different program allows to use it in any other program without doing modifications to those programs.
Roberto E. Vargas Caballero k0ga@shike2.com
make argv0 not static, fixes a warning with tcc Reported by Aajonus, thanks!
Hiltjo Posthuma hiltjo@codemadness.org
mouseshortcuts: fix custom modifier on release This line didn't work at mshortcuts at config.h: /* mask button function arg release */ { ShiftMask, Button2, selpaste, {.i = 0}, 1 }, and now it does work. The issue was that XButtonEvent.state is "the logical state ... just prior to the event", which means that on release the state has the Button2Mask bit set because button2 was down just before it was released. The issue didn't manifest with the default shift + middle-click on release (to override mouse mode) because its specified modifier is XK_ANY_MOD, at which case match(...) ignores any specific bits and simply returns true. The issue also doesn't manifest on press, because prior to the event Button<N> was not down and its mask bit is not set. Fix by filtering out the mask of the button which we're currently matching. We could have said "well, that's how button events behave, you should use ShiftMask|Button2Mask for release", but this both not obvious to figure out, and specifically here always filtering does not prevent configuring any useful modifiers combination. So it's a win-win.
Avi Halachmi (:avih) avihpit@yahoo.com
Remove explicit XNFocusWindow XCreateIC ICValues default XNFocusWindow to XNClientWindow if not specified, it can be omitted since it is the same. From the documentation https://www.x.org/releases/current/doc/libX11/libX11/libX11.html > Focus Window > > The XNFocusWindow argument specifies the focus window. The primary > purpose of the XNFocusWindow is to identify the window that will receive > the key event when input is composed. > > When this XIC value is left unspecified, the input method will use the > client window as the default focus window.
Ivan Tham pickfire@riseup.net
x: fix XIM handling Do not try to set specific IM method, let the user specify it with XMODIFIERS. If the requested method is not available or opening fails, fallback to the default input handler and register a handler on the new IM server availability signal. Do the same when the input server is closed and (re)started.
Quentin Rameau quinq@fifth.space
x: check we still have an XIC context before accessing it
Quentin Rameau quinq@fifth.space
x: do not instantiate a new nested list on each cursor move
Quentin Rameau quinq@fifth.space
x: move IME variables into XWindow ime embedded struct
Quentin Rameau quinq@fifth.space
Increase XmbLookupString buffer Current buffer is too short to input medium to long sentences from IME. Input with longer text will show the wrong input, taking 64 instead of 32 bytes should be enough for most of the cases. Broken cases before, Chinese (taken from song 也可以) 可不可以轻轻的松开自己 Japanese (taken from bootleggers rom quote) あなたは家のように感じる
Ivan Tham pickfire@riseup.net
update FAQ - add common question about the w3m image drawing hack. - remove some bad advise about $TERM. - change some links to https.
Hiltjo Posthuma hiltjo@codemadness.org
OSC 52 - copy to clipboard: don't limit to 382 bytes Strings which an application sends to the terminal in OSC, DCS, etc are typically small (title, colors, etc) but one exception is OSC 52 which copies text to the clipboard, and is used for instance by tmux. Previously st cropped these strings at 512 bytes, which for OSC 52 limited the copied text to 382 bytes (remaining buffer space before base64). This made it less useful than it can be. Now it's a dynamic growing buffer. It remains allocated after use, resets to 512 when a new string starts, or leaked on exit. Resetting/deallocating the buffer right after use (at strhandle) is possible with some more code, however, it doesn't always end up used, and to cover those cases too will require even more code, so resetting only on new string is good enough for now.
Avi Halachmi (:avih) avihpit@yahoo.com
CSIEscape, STREscape: use size_t for buffer length
Hiltjo Posthuma hiltjo@codemadness.org
STREscape: don't trim prematurely STRescape holds strings in escape sequences such as OSC and DCS, and its buffer is 512 bytes. If the input is too big then trailing chars are ignored, but the test was off-by-1 such that it took 510 chars instead of 511 (before a terminating NULL is added). Now the full size can be utilized.
Avi Halachmi (:avih) avihpit@yahoo.com
base64dec: don't read out of bounds Previously, base64dec checked terminating input '\0' every 4 calls to base64dec_getc, where the latter progressed one or more chars on each call, and could read past '\0' in the way it was used. The input to base64dec currently comes only from OSC 52 escape seq (copy to clipboard), and reading past '\0' or even past the buffer boundary was easy to trigger. Also, even if we could trust external input to be valid base64, there are different base64 standards, and not all of them require padding to 4 bytes blocks (using trailing '=' chars). It didn't affect short OSC 52 strings because the buffer is initialized to 0's, so typically it did stop within the buffer, but if the string was trimmed to fit (the buffer is 512 bytes) then it did also read past the end of the buffer, and the decoded suffix ended up arbitrary. This patch makes base64dec_getc not progress past '\0', and instead produce fake trailing padding of '='. Additionally, at base64dec, if padding is detected at the first or second byte of a quartet, then we identify it as invalid and abort (a valid quartet has at least two leading non-padding bytes).
Avi Halachmi (:avih) avihpit@yahoo.com
Fix tmux terminfo extensions Se and Ss The tmux terminfo extensions Ss and Se are currently specified as booleans in `st.info`. They should be strings. See https://github.com/tmux/tmux/blob/eeedb43ae847a0a692ceea965f7556e84bca4fd0/tty-term.c lines 254 and 265. I have used the values from https://invisible-island.net/ncurses/terminfo.src.html#toc-_S_I_M_P_L_E_T_E_R_M for this patch.
Sebastian J. Bronner waschtl@sbronner.com
apply hints before initial mapping (ICCCM) For WM_CLASS this is mentioned in the ICCCM docs https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.5 (third sentence). When changing the WM_CLASS from the command line, this is necessary for window managers to pick it up before applying class-based rules.
Ingo Lohmar ingo.lohmar@posteo.net
mouse shortcuts: allow using forcemousemod (e.g. shift) The recent mouse shurtcuts commits allow customization, but ignore forcemousemod mask (default: shift) as a modifier, for no good reason other than following the behavior of the KB shortcuts. Allow using forcemousemod too, which now can be used to invoke different shortcuts, though the automatic effect of forcemousemod will be lost for buttons which use mask with forcemousemod. E.g. the default is: static uint forcemousemod = ShiftMask; ... { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, ... where ttysend will be invoked for button4 with any mod when not in mouse mode, and with shift when in mouse mode. Now it's possible to do this: { ShiftMask, Button4, ttysend, {.s = "foo"} }, { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, Which will invoke ttysend("foo") while shift is held and ttysend("\031") otherwise. Shift still overrides mouse mode, but will now send "foo". Previously with this setup the second binding was always invoked because the forceousemod mask was always removed from the event. Buttons which don't use forcemousemod behave the same as before. This is useful e.g. for the scrollback mouse patch, which wants to configure shift+wheel for scrollback, while keeping the normal behavior without shift.
Avi Halachmi (:avih) avihpit@yahoo.com
mouse shortcuts: don't hardcode selpaste Because selpaste is activated on release, a release flag was added to mouse shortcuts which controls whether activation is on press/release, and selpaste binding to button2 was moved to config.h . button1 remains the only hardcoded mouse button - for selection + copy.
Avi Halachmi (:avih) avihpit@yahoo.com
mouse shortcuts: allow override for all shortcuts Allow forceselmod to override all mouse shortcuts rather than only selection, and rename it to forcemousemod as it's now more appropriate. This will affect mouse shortcuts which use mask other than XK_ANY_MOD. This does not affect the default behavior because the default mouse shortcuts (wheel) use XK_ANY_MOD, where forceselmod already activated the override also before this change. Previously, if a mouse shortcut was configured with a specific mod and forceselmod was held, then the shortcut did not execute unless the configured mod included forceselmod.
Avi Halachmi (:avih) avihpit@yahoo.com
mouse shortcuts: allow same functions as kb shortcuts Previously mouse shortcuts supported only ttywrite. This required adding an "Arg" function ttysend - which does what the original mouse shortcuts did.
Avi Halachmi (:avih) avihpit@yahoo.com
config.def.h: remove crlf value section this is not used anymore. patch sent as an ed script using RFC2549 by k0ga.
Hiltjo Posthuma hiltjo@codemadness.org
FAQ: add entry about color emoji Xft bug This has been asked many times on IRC and the mailinglist. Make it easier to find information about this particular Xft issue by adding it to the FAQ.
Hiltjo Posthuma hiltjo@codemadness.org
selection: fix view to match actual selection on first cell
Avi Halachmi (:avih) avihpit@yahoo.com
revert part of commit add0211522737b79dad990ccd65c8af63b5cc1dd "use iswspace()/iswpunct() to find word delimiters this inverts the configuration logic: you no longer provide a list of delimiters -- all space and punctuation characters are considered delimiters, unless listed in extrawordchars." Feedback from IRC and personal preference.
Hiltjo Posthuma hiltjo@codemadness.org
dont print color warning on color reset OSC 104 without parameter also print explicitly "(null)" when printf "%s" p=NULL. noticed when exiting mutt: printf '\x1b]104\x07'
Hiltjo Posthuma hiltjo@codemadness.org
minor code-style, initialize var at the top of function
Hiltjo Posthuma hiltjo@codemadness.org
config.def.h: tweak extra worddelimiters This changes the selection more like xterm. To test try: "find /" and select a path.
Hiltjo Posthuma hiltjo@codemadness.org
use iswspace()/iswpunct() to find word delimiters this inverts the configuration logic: you no longer provide a list of delimiters -- all space and punctuation characters are considered delimiters, unless listed in extrawordchars.
Lauri Tirkkonen lotheac@iki.fi
replace utf8strchr with wcschr
Lauri Tirkkonen lotheac@iki.fi
be silent about explicitly unhandled mouse modes
Lauri Tirkkonen lotheac@iki.fi
simplify (greedy) font caching allocating a bit POSIX says: "If ptr is a null pointer, realloc() shall be equivalent to malloc() for the specified size."
Hiltjo Posthuma hiltjo@codemadness.org
style: remove double empty newlines
Hiltjo Posthuma hiltjo@codemadness.org
fix use after free in font caching algorithm Current font caching algorithm contains a use after free error. A font removed from `frc` might be still listed in `wx.specbuf`. It will lead to a crash inside `XftDrawGlyphFontSpec()`. Steps to reproduce: $ st -f 'Misc Tamsyn:scalable=false' $ curl https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt Of course, result depends on fonts installed on a system and fontconfig. In my case, I'm getting consistent segfaults with different fonts. I replaced a fixed array with a simple unbounded buffer with a constant growth rate. Cache starts with a capacity of 0, gets increments by 16, and never shrinks. On my machine after `cat UTF-8-demo.txt` buffer reaches a capacity of 192. During casual use capacity stays at 0.
magras dr.magras@gmail.com
better Input Method Editor (IME) support Features: - Allow input methods swap with hotkey (E.g. left ctrl + left shift). - Over-the-spot pre-editing style, pre-edit data placed over insertion point. - Restart IME without segmentation fault. TODO: - Automatically pickup IME if st started before IME
Ivan Tham pickfire@riseup.net
bump version to 0.8.2
Hiltjo Posthuma hiltjo@codemadness.org
config: add Shift+Insert as selpaste() again This was changed before in: commit 20f713548de451b67db3306cf8cf7b2f38fee05c on Wed Jan 25 19:17:38 2017
Hiltjo Posthuma hiltjo@codemadness.org
Let the user specify CPPFLAGS This complements the work done in d4928ed, allowing the user to specify the preprocessor flags with the CPPFLAGS environment variable. This is useful for example to specify preprocessor macros with -D. CFLAGS could be used instead, but CPPFLAGS is more correct and is expected to be honored in some cases. For example, the helper scripts to build Debian packages make use of CPPFLAGS, but the variable is currently being ignored unless manually appended to CFLAGS.
Paride Legovini pl@ninthfloor.org
Set the path of pkg-config in a variable instead of hardcoding it In this way the path of pkg-config can be overridden from the command line. This is useful for example when cross-compiling.
Paride Legovini pl@ninthfloor.org
Makefile: fix dependencies on config.h patch by Younes Khoudli (changed slightly). Thanks
Hiltjo Posthuma hiltjo@codemadness.org
output child WEXITSTATUS/WTERMSIG on abnormal termination
Lauri Tirkkonen lotheac@iki.fi
fix memory leak in xloadcols() reported by Avi Halachmi (:avih)" <avihpit@yahoo.com> patch slightly changed by me.
Hiltjo Posthuma hiltjo@codemadness.org
st: small typofix in comment
Hiltjo Posthuma hiltjo@codemadness.org
small code-style fix
Hiltjo Posthuma hiltjo@codemadness.org
Remove the ISO 14755 feature And move it to the patches section. Keeping it would force to add an exec pledge on OpenBSD, and some people think it's bloated, so bye!
Quentin Rameau quinq@fifth.space
Revert "Simplify cursor color handling" This reverts commit 1911c9274d9b03f3d7999c6ce26e2d5169642d26.
Hiltjo Posthuma hiltjo@codemadness.org
Revert "Make cursor follow text color" This reverts commit b51bcd5553af3db394014efbd78acf7828fa48ff.
Hiltjo Posthuma hiltjo@codemadness.org
Revert "Fix crash when cursor color is truecolor" This reverts commit 5535c1f04c665c05faff2a65d5558246b7748d49.
Hiltjo Posthuma hiltjo@codemadness.org
Fix crash when cursor color is truecolor Reported-by: Ivan Tham <pickfire@riseup.net>
Jules Maselbas jules.maselbas@grenoble-inp.org
Make cursor follow text color
Jules Maselbas jules.maselbas@grenoble-inp.org
Simplify cursor color handling
Jules Maselbas jules.maselbas@grenoble-inp.org
Fix crash on resize Prevent to realloc xw.specbuc with a negative number of col. Add proper hints for the minimal size, for one character.
Jules Maselbas jules.maselbas@grenoble-inp.org
config.mk: remove extra newline before EOF
Hiltjo Posthuma hiltjo@codemadness.org
code-style for pledge(2) feedback from Klemens, thanks
Hiltjo Posthuma hiltjo@codemadness.org
Pledge on OpenBSD
Hiltjo Posthuma hiltjo@codemadness.org
error message style and use strerror in a few places
Hiltjo Posthuma hiltjo@codemadness.org
st -v: remove years and copyright text
Hiltjo Posthuma hiltjo@codemadness.org
set sel.alt in selstart instead of selextend
Daniel Tameling tamelingdaniel@gmail.com
bump version to 0.8.1
Hiltjo Posthuma hiltjo@codemadness.org
fix regression by selecting clipboard text "restore the old behaviour that the primary doesn't get deleted by a simple left click" Patch by Daniel Tameling <tamelingdaniel@gmail.com>, thanks!
Hiltjo Posthuma hiltjo@codemadness.org
don't modify argv, use a counter on some platforms (OpenBSD) this changes the exposed argv in tools using the kvm_* interface, such as ps and pgrep.
Hiltjo Posthuma hiltjo@codemadness.org
selextend: clarify: !sel.mode == SEL_IDLE
Hiltjo Posthuma hiltjo@codemadness.org
clipcopy: no need to check for free(NULL), set to NULL after free
Hiltjo Posthuma hiltjo@codemadness.org
minor code-style: whitespace fixes
Hiltjo Posthuma hiltjo@codemadness.org
Fix title initialization
Quentin Rameau quinq@fifth.space
Fix regression from 69e32a6 when setting title.
Quentin Rameau quinq@fifth.space
LICENSE: fix a few years
Hiltjo Posthuma hiltjo@codemadness.org
update LICENSE: major contributors
Hiltjo Posthuma hiltjo@codemadness.org
Makefile: add all files to make dist
Hiltjo Posthuma hiltjo@codemadness.org
bump version to 0.8
Hiltjo Posthuma hiltjo@codemadness.org
use math.h for ceilf
Hiltjo Posthuma hiltjo@codemadness.org
xhints: no need to initialize sizeh
Hiltjo Posthuma hiltjo@codemadness.org
regression: include termios.h for tcsendbreak etc
Hiltjo Posthuma hiltjo@codemadness.org
General cleanup Simplifies logic in a couple places and removes a redundant function call. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Clean up #includes Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Reduce visibility wherever possible When possible, declare functions/variables static and move struct definitions out of headers. In order to allow utf8decode to become internal, use codepoint for DECSCUSR extension directly. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Limit usage of extern to config.h globals Prefer passing arguments to declaring external global variables. The only remaining usage of extern is for config.h variables which are needed in st.c instead of x.c (where it is now included). Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Remove x.c dependency on term The xinit function only needs to the rows/cols, so pass those in rather than accessing term directly. With a bit of arithmetic, we are able to avoid the need for term.row and term.col in x2col, y2row, and xdrawglyphfontspecs as well, completing the removal. Term is now fully internal to st.c. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Pull term references out of xdrawcursor Gradually reducing x.c dependency on Term object. Old and new cursor glyph/position are passed to xdrawcursor. (There may be an opportunity to refactor further if we can unify "clear old cursor" and "draw new cursor" functionality.) Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move win-agnostic parts of draw/drawregion to st.c Introduces three functions to encapsulate X-specific behavior: * xdrawline: draws a portion of a single line (used by drawregion) * xbegindraw: called to prepare for drawing (will be useful for e.g. Wayland) and returns true if drawing should happen * xfinishdraw: called to finish drawing (used by draw) Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Split mode bits between Term and TermWindow Moves the mode bits used by x.c from Term to TermWindow, absorbing UI/input-related mode bits (visible/focused/numlock) along the way. This is gradually reducing external references to Term. Since TermWindow is already internal to x.c, we add xsetmode() to allow st to modify window bits in accordance with escape sequences. IS_SET() is redefined accordingly (term.mode in st.c, win.mode in x.c). Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move CRLF input processing into ttywrite This also allows us to remove the crlf field from the Key struct, since the only difference it made was converting "\r" to "\r\n" (which is now done automatically in ttywrite). In addition, MODE_CRLF is no longer referenced from x.c. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move terminal echo logic into st.c The only thing differentiating ttywrite and ttysend was the potential for echo; make this a parameter and remove ttysend. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move remaining selection mode logic into selextend The "done" parameter indicates a change which finalizes the selection (e.g. a mouse button release as opposed to motion). Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move terminal-related selection logic into st.c The front-end determines information about mouse clicks and motion, and the terminal handles the actual selection start/extend/dirty logic by row and column. While we're in the neighborhood, we'll also rename getbuttoninfo() to mousesel() which is, at least, less wrong. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move X-specific selection info into XSelection Data about PRIMARY/CLIPBOARD and clicks are part of the front-end, not the terminal. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Have selected() check whether selection exists Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Rely on ttyresize to set tty size This removes ttynew's dependency on cresize being called first, and then allows us to absorb the ttyresize call into cresize (which always precedes it). Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Remove X and fontconfig from st.c None of the X-related includes are needed any longer. In addition, move the X modifier defines into x.c, as they are not used outside. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Remove Time argument from xsetsel This is an X type and should be internal to x.c. The selcopy() function was a single line and only used in one place, so it was inlined to reduce LOC. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Make win variable internal to x.c There was only a single reference to the `win` variable in st.c, so exporting that to x.c allows us to rid ourselves of another extern. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move X-related config.h types into x.c No need to expose Shortcut, MouseShortcut, and Key anymore. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Remove unneeded array-length variables These were only used in x.c, which now has direct visibility of the config.h arrays. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Inline clipboard functions No need to keep a function that only calls another function in the same file. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move config.h include from st.c to x.c config.h includes references to KeySyms and other X stuff. Until we come up with a cleaner way to separate configuration, it is simpler (leads to more code removal) to have this here. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Factor out equivalent code from ttyread/ttysend The echo-to-terminal portions of ttyread and ttysend were actually doing the same thing. New function twrite() now handles this. The parameter show_ctrl determines whether control characters are shown as "^A". This was the only difference between tputc and techo, and techo is now unused and removed. (This commit should not change st's behaviour.) Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move opt_* into same file as main()/run() This commit is purely about reducing externs and LOC. If the main and run functions ever move elsewhere (which will probably make sense eventually), these should come along with them. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move key-matching functions into x.c Modifiers and keysyms are specific to X, and the functions match and kmap are only used in x.c. Needed to global-ize the key arrays and lengths from config.h (for now). Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Pass new dimensions into ttyresize This removes another reference to TermWindow from st.c. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move window-manipulating functions into x.c xresize is now internal to x.c Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move font/fontspec variables into x.c and XWindow Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move window urgency handling entirely into x.c This allows us to make xseturgency internal. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move zoom functions into x.c This makes x(un)loadfonts internal to x.c. Needed to reorder includes and move a typedef to keep the compiler happy. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Move usage() to be with run() in x.c run/usage/xinit are now all internal to x.c Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Call xsetenv() in main process instead of child This makes xsetenv internal to x.c, and allows iso14755's external command to use $WINDOWID instead of having to snprintf it again. (The same benefit will apply to the externalpipe patch.) The xwinid function is no longer needed. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Devin J. Pohly djpohly@gmail.com
Fix color with FAINT attribute The alpha value needs to be initialized as well.
Benno Fünfstück benno.fuenfstueck@gmail.com
Apply ATTR_REVERSE after ATTR_FAINT An example where the new behaviour makes more sense: Suppose some text is formatted with ATTR_FAINT for red for the foreground, so it is rendered in a dark red. In that case, when selected with the mouse, the intended behaviour is that foreground and background color are swapped: so the selection should be rendered in dark red and the text in the default background color. Before this patch, what happened was that the selection would be in normal red and the text in the darkened background color, making it almost unreadable. For an example application that uses the FAINT attribute, try dmesg from util-linux with color support, it uses FAINT for segfault messages.
Benno Fünfstück benno.fuenfstueck@gmail.com
Fix FAQ typo
George Ornbo george@shapeshed.com
Fix manpage typo Signed-off-by: Paride Legovini <pl@ninthfloor.org>
Paride Legovini pl@ninthfloor.org
Add an error for XftFontOpenPattern failure.
Gary Allen Vollink gary@vollink.com
Revert "Revert "fixed STLDFLAG order in broken st Makefile"" This reverts commit 274d46ace00003d1df718b974d17642cbce167d5. Sorry, the original commit was correct after all. It allows has the correct link order and supports static-linking also. Just a reminder: it is important to give a (brief) rationale of the patch intentions.
Hiltjo Posthuma hiltjo@codemadness.org
base64dec: skip non-printable characters like \r\n Non-printable characters, such as line breaks, in a base64 encoded string violate the "string length must be a multiple of four" rule. This patch pads the result buffer by one extra unit of four bytes, and skips over non-printable characters found in the input string.
Suraj N. Kurapati sunaku@riseup.net
Revert "fixed STLDFLAG order in broken st Makefile" This reverts commit 7f990328e4fec8dfaaad311cb8af2304b58c872e. this was wrong as pointed out by k0ga: "STLDFLAGS is about flags to the linker, for example -L not about -l for that reason it must go before the object list".
Hiltjo Posthuma hiltjo@codemadness.org
Revert "make clipboard patch obsolete" This reverts commit 77c51c5a6b16387f1792e23acbcf2080f790aa25. Having multiple clipboards are useful, for example for plumber scripts. I've discussed this on IRC and it is useful to have.
Hiltjo Posthuma hiltjo@codemadness.org
make clipboard patch obsolete
Anselm R Garbe anselm@garbe.us
fixed STLDFLAG order in broken st Makefile
Anselm R Garbe anselm@garbe.us
Revert "Add bold off SGR" This reverts commit 6cb6d61525931c88971cce323f63e40451a6d365. This wasn't a useful thing after all.
Quentin Rameau quinq@fifth.space
Add dim/smxx/rmxx to terminfo, remove duplicate kich1
Quentin Rameau quinq@fifth.space
Let the user specify C and LD FLAGS
Quentin Rameau quinq@fifth.space
Do not obfuscate what make is doing. Change some styling too while we're at it.
Quentin Rameau quinq@fifth.space
Add color change terminfo capabilities
Marc André Tanner mat@brain-dump.org
Add bold off SGR
Quentin Rameau quinq@fifth.space
st.1: modify man page to accurately reflect default keybindings Attached. ===> 2/ (text/x-patch) [file] cp /mail/fs/mbox/298/2/body /usr/k0ga/0001-st.1-modify-man-page-to-accurately-reflect-default-k.patch From 265db94b1eca5850d484f86b7db4af8e57822cfe Mon Sep 17 00:00:00 2001 From: Greg Reagle <greg.reagle@umbc.edu> Date: Sun, 9 Apr 2017 23:05:47 -0400 Subject: [PATCH] st.1: modify man page to accurately reflect default keybindings
greg.reagle@umbc.edu greg.reagle@umbc.edu
Simplify how we keep ATTRs under cursor Thanks to tarug0 for the suggestion/patch.
Quentin Rameau quinq@fifth.space
Fix commented out code
Alexander Krotov ilabdsf@gmail.com
keep some glyph modes for the cursor st currently does not keep any mode for the cursor that was active in the underlying glyph (e.g. italic text), the mode is always ATTR_NULL [1]. At [2] you can find a screenshot that shows the implications. Other terminals (at least vte-based, such as XFCE-terminal) keep some modes for the cursor. I find the current behaviour very disruptive, so here is a patch that keeps a few (arbitrarily chosen) modes for the cursor. [1] http://git.suckless.org/st/tree/st.c#n3963 [2] http://i.imgur.com/R2yCEaC.png
Nils Reuße n.reusse@hxgn.net
Support xterm Ms feature to set clipboard This is used by, e.g., tmux.
osandov@osandov.com osandov@osandov.com
Change default keybindings CTRL+SHIFT is an impossible combination in the terminal world (0x20 | x & 0x1F), so it is perfect to be used for internals shortcuts of terminals, and being a double combination reduces the prossibility of having comflicts.
Roberto E. Vargas Caballero k0ga@shike2.com
Split X-specific code into x.c
Michael Forney mforney@mforney.org
Move column and row default numbers into config.h
fpqc harry.gindi@live.com
Revert "Initial font size issue." This reverts commit 424202798b02554092ba84dd59fb7b79b59b7b75.
Roberto E. Vargas Caballero k0ga@shike2.com
Fixed 'missing glyph doesn't use fontconfig config substitutions' bug XftFontMatch does display-specific font configuration (commit 528241a). Nice. Unfortunately, when we switched from FcFontMatch, we also stopped storing the post-Fc{Config,Default}Substitute FcPattern for future lookups. The result is that if a glyph isn't found in the primary font, secondary font lookups use the original FcPattern, not the configured one. If you have custom fontconfig rules (like me), this can be disappointing. I basically just copied the guts out of XftFontMatch[1] and saved the intermediate configured FcPattern. Could be related to the bug that inspired commit 4242027. [1]: https://cgit.freedesktop.org/xorg/lib/libXft/tree/src/xftfont.c
Spencer Phippen spencer.phippen@gmail.com
make the various combinations of arrow keys and shift/control/meta work When using st with screen, I've bound next, prev, new screen to combinations like Ctrl-Alt-Right,Left,Down; xterm and (u)rxvt work fine when this combination of modifiers is pressed, st does not seem to transport all of them; a single modifier key is fine (e.g. Ctrl-Up, Alt-Down etc., but combinations are not). While I'm not terribly familiar with this, I have tried to hack config.h in a more or less systematic way to generate the expected sequences.
Manuel Tobias Schiller mala@hinterbergen.de
Initial font size issue. Hi, When I specify a font by point size (I'm using "Inconsolata:size=12"), characters that are substituted from another font because they are not in the main one appear too small. Doing a zoom reset fixes it. For example: Before: http://i.imgur.com/G4Mfv4X.png After: http://i.imgur.com/PMDhfQA.png I found that adding the pixel size (acquired from the initial font load) to the pattern then reloading the font fixes the problem. I'm not sure if this is a proper fix, though.
ian@remmler.org ian@remmler.org
tic -s -> tic -sx (Treat unknown capabilities as user-defined.)
pl@ninthfloor.org pl@ninthfloor.org
Add tmux capabilities to st.info
pl@ninthfloor.org pl@ninthfloor.org
Make strdump(), csidump(), print to stderr The two functions strdump(), csidump() are called to show errors and their output is introduced by a message printed to stderr. Thus, it it more consistent to have them print to stderr. Moreover stderr is unbuffered (at least on Linux), making problems immediately visible.
pl@ninthfloor.org pl@ninthfloor.org
Do not use color when font attributes are supported If fontconfig gives us a font without the attributes we asked for, display an alternative color instead.
Quentin Rameau quinq@fifth.space
st.1: add an entry for ISO-14755 shortcut
Quentin Rameau quinq@fifth.space
Add support for iso14755 We launch dmenu for getting a codepoint, then convert it and send it to the terminal.
Quentin Rameau quinq@fifth.space
Add missing device path to '-l' example Also, it's ttyS0 not ttySO.
Klemens Nanni kl3@posteo.org
Add parsing of DCS q sequences These sequences are used to operate with sixels, but they are still str sequences, so they are finished with \a, ST or with a C1 control code. This patch also disables utf8 handling for the case of sixels.
Roberto E. Vargas Caballero roberto.vargas@igrid-td.com
Add support for enabling/disabling utf There are some ocasions where we want to disable the enconding/decoding of utf8, mainly because it adds an important overhead. This is partial patch for ESC % G and ESC % @, where they modified the way that st reads and write from/to the serial line, but it does not modifies how it interacts with the X window part.
Roberto E. Vargas Caballero roberto.vargas@igrid-td.com
Delete ncv capability from terminfo We do not need to disable the previous ncv definition, because there is not previous definition.
Roberto E. Vargas Caballero roberto.vargas@igrid-td.com
st.info: do not prevent st from displaying attributes With ncv set to 3, we prevent st from displaying A_STANDOUT and A_UNDERLINE with colors while our virtual terminal is capable of it.
Quentin Rameau quinq@fifth.space
Update the LICENSE. This is for the next release.
Christoph Lohmann 20h@r-36.net
0.7 release
Christoph Lohmann 20h@r-36.net
Change who's expanding tabs.
Christoph Lohmann 20h@r-36.net
Add some hint to have the pseudo terminal in the right mode. If you don't make sure that the terminal does not expand tabs to spaces, of course such a setting won't work.
Christoph Lohmann 20h@r-36.net
Add comment about tabspaces. st.info needs to be changed too, when tabspaces are changed.
Christoph Lohmann 20h@r-36.net
Consistent Alt+BackSpace behavior The default config specifies BackSpace as "\177". The default behavior should persist across modifier keys, commonly Mod1 (Alt or Meta) which is widely used to delete a word on readline and text editors, notably Emacs. This will make Alt+BackSpace behaves as expected, i.e. sends "\033\177" instead of "\033\010" as previous default behavior. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Alive 4ever alive4ever@live.com
Use XftFontMatch in place of FcFontMatch. git am -s didn't like your patch: From: Mark Edgar <medgar123@gmail.com> XftFontMatch calls XftDefaultSubstitute which configures various match properties according to the user's configured Xft defaults (xrdb) as well as according to the current display and screen. Most importantly, the screen DPI is computed [1]. Without this, st uses a "default" DPI of 75 [2]. [1]: https://cgit.freedesktop.org/xorg/lib/libXft/tree/src/xftdpy.c?id=libXft-2.3.2#n535 [2]: https://cgit.freedesktop.org/fontconfig/tree/src/fcdefault.c?id=2.11.1#n255
Christoph Lohmann 20h@r-36.net
delete clipboard properties after pasting them https://tronche.com/gui/x/icccm/sec-2.html#s-2.4 specifies: > Once all the data in the selection has been retrieved, > the requestor should delete the property in the SelectionNotify request Most Clipboard-Owners ignore whether or not the property is already set, so this is mostly a cosmetic change to keep the windows property list clean. However, at least synergy decides to wait for the requestor to delete the properties if they are already set by a previous paste (from synergy). Signed-off-by: Christoph Lohmann <20h@r-36.net>
v4hn me@v4hn.de
Remove stupid assignation in memcpy()
Roberto E. Vargas Caballero roberto.vargas@igrid-td.com
st: Fix off-by-one error when calculating character width. LEN(str) is one larger than strlen(str) because it also counts the zero terminator. The original code would include the .notdef glyph (since it'll try to encode character 0, which gets encoded to the .notdef glyph) when measuring the average dimensions of printable ascii characters. This causes problems with fonts like GNU Unifont where the .notdef glyph is not the same width as the usual half-width characters. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Tor Andersson tor@ccxvii.net
Fix vertical character alignment in some cases The y-position of a character found by asking fontconfig for a matching font does not take the border pixels into account, resulting in a slightly misaligned vertical position. Signed-off-by: Ton van den Heuvel <tonvandenheuvel@gmail.com> Signed-off-by: Christoph Lohmann <20h@r-36.net>
Ton van den Heuvel tonvandenheuvel@gmail.com
I like empty lines.
Christoph Lohmann 20h@r-36.net
Measure the single advance width with a heuristic method This fix is needed to use dual-width fonts, which have double-width glyphs (e.g. CJK unified ideographs). Signed-off-by: Ryusei Yamaguchi <mandel59@gmail.com> Signed-off-by: Christoph Lohmann <20h@r-36.net>
Ryusei Yamaguchi mandel59@gmail.com
xtermclear() is now done by xdrawglyphfontspecs() Thanks Ton van den Heuvel for the proposal!
Christoph Lohmann 20h@r-36.net
arg.h: fixed argv checks order This prevents accessing to a potentially out-of-bounds memory section. Signed-off-by: Lucas Gabriel Vuotto <l.vuotto92@gmail.com> Signed-off-by: Christoph Lohmann <20h@r-36.net>
Lucas Gabriel Vuotto l.vuotto92@gmail.com
Fix forgotten bracket and duplicate option in usage() Scratch the preceding patch, this one is more correct (don't forget to 'git am --scissors' ;)) -- >8 -- Also reformat the strings in a saner layout Signed-off-by: Christoph Lohmann <20h@r-36.net>
Quentin Rameau quinq@fifth.space
Extract ttyresize() out of cresize() This way we can call cresize() to set the terminal size before creating a tty or spawning a process, which will start with the correct size. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Quentin Rameau quinq@fifth.space
Ok, no need for a separate version function. This is just redundant metadata. Please add Java comment meta classes too.
Christoph Lohmann 20h@r-36.net
Add -n option for setting WM_CLASS instance name Signed-off-by: Christoph Lohmann <20h@r-36.net>
Quentin Rameau quinq@fifth.space
Reformat usage and separate version from it Signed-off-by: Christoph Lohmann <20h@r-36.net>
Quentin Rameau quinq@fifth.space
Enforce a terminal size to reduce race conditions in too efficient apps. dvtm is too fast in starting up. It will then have a race condition in finding the right. terminal size.
Christoph Lohmann 20h@r-36.net
Height is height.
Christoph Lohmann 20h@r-36.net
Bump year.
Christoph Lohmann 20h@r-36.net
Fixing the XClassHint setting in st.
Christoph Lohmann 20h@r-36.net
Avoid recursive call to ttywrite from ttyread Ttyread() calls to ttywrite, so if we check for reading before that for writing in ttywrite we can get a circular call sequence.
Roberto E. Vargas Caballero k0ga@shike2.com
arg.h: remove unused macros ARGUM isn't used and ARGNUMF uses estrtol() that isn't defined anywhere. Those were probably copied from sbase arg.h. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Quentin Rameau quinq+hackers@fifth.space
Introduce lim in all ttywrite() checks.
Christoph Lohmann 20h@r-36.net
Fix ttywrite() ttywrite was assuming that if it could not write then it could read, but this is not necessarily true, there are some situations where you cannot read or write. The correct behaviour is to detect if you can read or/and write.
Roberto E. Vargas Caballero k0ga@shike2.com
Now the mshortcuts are even more consistent. Keep everyone happy Signed-off-by: Christoph Lohmann <20h@r-36.net>
Ivan Tham pickfire@riseup.net
Now the Shortcuts are more consistent. Keep the debile happy.
Christoph Lohmann 20h@r-36.net
fix bug where first selection snaps to lines
Jason Woofenden jason@jasonwoof.com
Fix the cursor colors selection Signed-off-by: Christoph Lohmann <20h@r-36.net>
Quentin Rameau quinq@fifth.space
Normalize the whole color selection in xdrawcursor.
Christoph Lohmann 20h@r-36.net
Fix the cursor color when over selection. If we want to show a custom selected cursor color, we must not set the revert attribute to the drawn glyph. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Quentin Rameau quinq@fifth.space
Make the cursor shapes more descriptive. »IBeam« is now »Bar« because it's named like that in the source code.
Christoph Lohmann 20h@r-36.net
Snowman is everywhere.
Christoph Lohmann 20h@r-36.net
Style normalisation in the config.def.h. This adds an awareness commit for the big key array too.
Christoph Lohmann 20h@r-36.net
The definition of the reverse cursor is now up to the user.
Christoph Lohmann 20h@r-36.net
Fixing the cursor movement in selections. Before the fix the cursor wouldn't obey if it's in a selection. If it is inside it will now change to the reverse. This patch also adds that the defaultcs will be reversed for the manually drawn cursors.
Christoph Lohmann 20h@r-36.net
When the cursor is moved, clear the selection.
Christoph Lohmann 20h@r-36.net
Reverse the cursor on selection.
Christoph Lohmann 20h@r-36.net
More style changes. We forgot some switches.
Christoph Lohmann 20h@r-36.net
Small style change.
Christoph Lohmann 20h@r-36.net
There's no need for libXext to compile st.
Christoph Lohmann 20h@r-36.net
Fix extra bracketed paste markers when pasting >8kb Before this patch, when pasting over BUFSIZE (8192 bytes here), st would do the following: \e[200~...8192 bytes...\e[201~\e[200~...remaining bytes...\e[201~ With this patch, the start marker is only sent when the offset is 0 (at the beginning of selnotify) and the end marker is only sent when the remaining bytes to read are 0 (at the end). For short pastes, both conditions are true in the same iteration. For long pastes, it removes the extra markers in the middle, keeping the intended wrapping: \e[200~...8192 bytes......remaining bytes...\e[201~ Signed-off-by: Christoph Lohmann <20h@r-36.net>
dequis dx@dxzone.com.ar
dup() -> dup2() gcc would warn about an unused result. We know it is 0 and dup() can't fail in these circumstances, as we closed fd0 previously. Using dup2() to do the same saves one line and shuts gcc up, bringing us a clean build back.
FRIGN dev@frign.de
The times of bad fonts are over. The antialiasing was false due to circumstances that do not exist anymore. We need antialiasing on big screens with big fonts. Autohinting too.
Christoph Lohmann 20h@r-36.net
Fix copy of line with len = 0 When a line has no any character linelen is 0, so last = &term.line[y][MIN(lastx, linelen-1)] generated a pointer to the end of the previous line. The best thing we can do in this case is to add a newline, because we don't have a glyph to print (and consult its state of wrapping).
Roberto E. Vargas Caballero k0ga@shike2.com
Change Pause to Break in shortcut for serial break
Roberto E. Vargas Caballero k0ga@shike2.com
Expose cursor shape in config.def.h Signed-off-by: Christoph Lohmann <20h@r-36.net>
Jan Christoph Ebersbach jceb@e-jc.de
Add key to send a break to the serial line
Roberto E. Vargas Caballero k0ga@shike2.com
Set default values of stty according to the man page This configuration is basically 38400 8N1, without echo and in raw mode. Kernel will not process any of the characters sent by the user.
Roberto E. Vargas Caballero k0ga@shike2.com
Making st.1 more descriptive about -l and fix -l in st.c.
Christoph Lohmann 20h@r-36.net
Fix the st manpage for -l line.
Christoph Lohmann 20h@r-36.net
Reordering and adding control codes. For completeness and documentation add all C1 control codes.
Christoph Lohmann 20h@r-36.net
Merge branch 'master' of ssh://suckless.org/gitrepos/st
Christoph Lohmann 20h@r-36.net
Don't read if we chunked the input data.
Christoph Lohmann 20h@r-36.net
st.info: replace the acsc entry from xterm to urxvt The current acsc entry, copied from xterm was not exposing capability to display arrows.
Quentin Rameau quinq@fifth.space
Adding mouse colour/shape settings
Alex Kozadaev akozadaev at yahoo com
Adding -T to the usage too.
Christoph Lohmann 20h@r-36.net
Add -T, as recommended by Dmitrij D. Czarkoff
Christoph Lohmann 20h@r-36.net
Fix type for write(2) return variable. A little fix in xwrite(). >From 3727d2e3344b57128ab51c7839795204f1f839ff Mon Sep 17 00:00:00 2001 From: Quentin Rameau <quinq@fifth.space> Date: Fri, 24 Jul 2015 11:40:46 +0200 Subject: [PATCH] Fix type for write(2) return variable. The allocated lengh of s fits into an integer so we can safely use ssize_t here.
Quentin Rameau quinq+hackers@fifth.space
added note about the low precedence of shell to config.def.h
Mytchel Hammond mytchel@openmailbox.org
Fix style in execsh
Roberto E. Vargas Caballero k0ga@shike2.com
Make the comment for the IM XFilter more understandable.
Christoph Lohmann 20h@r-36.net
Return style unification.
Christoph Lohmann 20h@r-36.net
Aligning the macros.
Christoph Lohmann 20h@r-36.net
Unix end of file.
Christoph Lohmann 20h@r-36.net
No inline declarations please.
Christoph Lohmann 20h@r-36.net
Typo and the missing incr atom from the patches.
Christoph Lohmann 20h@r-36.net
Implement chunked write to the cmdfd. This is needed so big input like a paste of several megabyte does not clog our I/O.
Christoph Lohmann 20h@r-36.net
Implement INCR transfers in the clipboard.
Christoph Lohmann 20h@r-36.net
Update LICENSE Signed-off-by: Christoph Lohmann <20h@r-36.net>
FRIGN dev@frign.de
Don't treat clauses like functions and add a space between the keyword and the parentheses. Signed-off-by: Christoph Lohmann <20h@r-36.net>
FRIGN dev@frign.de
Use BSD-style function notation Put the opening brace on a new line. This was already used for some functions inside st.c. Signed-off-by: Christoph Lohmann <20h@r-36.net>
FRIGN dev@frign.de
Unboolify st This practice proved itself in sbase, ubase and a couple of other projects. Also remove the True and False defined in X11 and FcTrue and FcFalse defined in Fontconfig. Signed-off-by: Christoph Lohmann <20h@r-36.net>
FRIGN dev@frign.de
Remove insane *_FILENO and EXIT_* usage Any system having different assignments than the usual 0, 1, 2 for the standard file numbers and 0, 1 for the exit-statuses is broken beyond repair. Let's keep it simple and just use the numbers, no reason to fall out of the window here and bend down for POSIX. In one occasion, the ret-variable was not necessary. The check was rewritten. Signed-off-by: Christoph Lohmann <20h@r-36.net>
FRIGN dev@frign.de
Commit to push the 0.6 release.
Christoph Lohmann 20h@r-36.net
Revert "Remove unnecessary XFilterEvent call." This reverts commit d2937b05aed9cee8d6651cd806d31682a853c773.
Weng Xuetian wengxt@gmail.com
do not truncate font size when zooming
Quentin Rameau quinq@quinq.eu.org
Revert "Optimize memory footprint of line buffers" This reverts commit 7ab6c92e18d468968811256e808b02309c160a22. We need 32 bits for real color support.
Roberto E. Vargas Caballero k0ga@shike2.com
Support UTF-8 characters as word delimiters For a higher usefulness of the utf8strchr function, the index of the UTF-8 character could be returned in addition with a Rune instead of a char*. Since utf8strchr is currently only used by ISDELIM I didn't bother to increase the complexity.
Jan Christoph Ebersbach jceb@e-jc.de
Merge branch 'master' of ssh://suckless.org/gitrepos/st
Roberto E. Vargas Caballero k0ga@shike2.com
set selection to IDLE on clear Otherwise a tangling bmotion event will consider the selection still valid and selnormalize segfaults because of an invalid sel.ob.y index.
v4hn me@v4hn.de
Small bugfix for makeglyphfontspecs call in drawregion Here's a patch that fixes a bug when calling `makedrawglyphfontspecs' in `drawregion'. Wasn't offseting the pointer into the input glyphs array by `x1'. The bug isn't causing any problems currently, because `drawregion' is always called with `x1' and `y1' values of 0, but if this ever changes in the future, the bug would certainly cause some problems.
Clean up xdraws and optimize glyph drawing with non-unit kerning values I have another patch here for review that optimizes the performance of glyph drawing, primarily when using non-unit kerning values, and fixes a few other minor issues. It's dependent on the earlier patch from me that stores unicode codepoints in a Rune type, typedef'd to uint_least32_t. This patch is a pretty big change to xdraws so your scrutiny is appreciated. First, some performance numbers. I used Yu-Jie Lin termfps.sh shell script to benchmark before and after, and you can find it in the attachments. On my Kaveri A10 7850k machine, I get the following results: Before Patch ============ 1) Font: "Liberation Mono:pixelsize=12:antialias=false:autohint=false" cwscale: 1.0, chscale: 1.0 For 273x83 100 frames. Elapsed time : 1.553 Frames/second: 64.352 Chars /second: 1,458,159 2) Font: "Inconsolata:pixelsize=14:antialias=true:autohint=true" cwscale: 1.001, chscale: 1.001 For 239x73 100 frames. Elapsed time : 159.286 Frames/second: 0.627 Chars /second: 10,953 After Patch =========== 3) Font: "Liberation Mono:pixelsize=12:antialias=false:autohint=false" cwscale: 1.0, chscale: 1.0 For 273x83 100 frames. Elapsed time : 1.544 Frames/second: 64.728 Chars /second: 1,466,690 4) Font: "Inconsolata:pixelsize=14:antialias=true:autohint=true" cwscale: 1.001, chscale: 1.001 For 239x73 100 frames. Elapsed time : 1.955 Frames/second: 51.146 Chars /second: 892,361 As you can see, while the improvements for fonts with unit-kerning is marginal, there's a huge ~81x performance increase with the patch when using kerning values other than 1.0. So what does the patch do? The `xdraws' function would render each glyph one at a time if non-unit kerning values were configured, and this was the primary cause of the slow down. Xft provides a handful of functions which allow you to render multiple characters or glyphs at time, each with a unique <x,y> position, so it was simply a matter of massaging the data into a format that would allow us to use one of these functions. I've split `xdraws' up into two functions. In the first pass with `xmakeglyphfontspecs' it will iterate over all of the glyphs in a given row and it will build up an array of corresponding XftGlyphFontSpec records. Much of the old logic for resolving fonts for glyphs using Xft and fontconfig went into this function. The second pass is done with `xrenderglyphfontspecs' which contains the old logic for determining colors, clearing the background, and finally rendering the array of XftGlyphFontSpec records. There's a couple of other things that have been improved by this patch. For instance, the UTF-32 codepoints in the Line's were being re-encoded back into UTF-8 strings to be passed to `xdraws' which in turn would then decode back to UTF-32 to verify that the Font contained a matching glyph for the code point. Next, the UTF-8 string was being passed to `XftDrawStringUtf8' which internally mallocs a scratch buffer and decodes back to UTF-32 and does the lookup of the glyphs all over again. This patch gets rid of all of this redundant round-trip encoding and decoding of characters to be rendered and only looks up the glyph index once (per font) during the font resolution phase. So this is probably what's responsible for the marginal improvements seen when kerning values are kept to 1.0. I imagine there are other performance improvements here too, not seen in the above benchmarks, if the user has lots of non-ASCII code plane characters on the screen, or several different fonts are being utilized during screen redraw. Anyway, if you see any problems, please let me know and I can fix them.
Changed type for UTF-32 codepoints from long to uint_least32_t
Fix empty selection highlighting bug. When user clicks LMB, one character is selected, but will not be copied to selection until the user moves cursor a bit. Therefore, the character should not be highlighted as selected yet. Before the patch, the trick was not to mark line as dirty to avoid highlighting it. However, if user has already selected something and clicks in line that contains selection, selclear sets the line as dirty and one character is highlighted when it should not. This patch replaces dirty trick with explicit check for sel.mode inside selected().
noname noname@inventati.org
Fix indentation.
noname noname@inventati.org
Add enumeration for sel.mode This patch also prevents sel.mode from increasing beyond 2. It is almost impossible, but sel.mode may overflow if mouse is moved around for too long while selecting.
noname noname@inventati.org
selnormalize: make special case explicit Special case is when regular selection spans multiple lines. Otherwise, just sort sel.ob.x and sel.ob.y.
noname noname@inventati.org
selsnap: simplify SNAP_LINE case Also make sure y never exceeds term.row-1 even if ATTR_WRAP is set for some reason.
noname noname@inventati.org
Remove first argument of selsnap.
noname noname@inventati.org
Fix sigchld Only wait for termination of the shell.
Jochen Sprickerhof dwm@jochen.sprickerhof.de
len assignment is never used Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
mvdan@mvdan.cc mvdan@mvdan.cc
Clarify calculation precedence for '&' and '?' Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
mvdan@mvdan.cc mvdan@mvdan.cc
Use %u for uint Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
mvdan@mvdan.cc mvdan@mvdan.cc
Optimize memory footprint of line buffers
Make tputc, tsetchar and techo accept unicode
noname@inventati.org noname@inventati.org
Change internal character representation.
noname@inventati.org noname@inventati.org
Remove last parameter of utf8encode This parameter was always UTF_SIZ, so it is better remove it and use directly UTF_SIZ in it.
noname@inventati.org noname@inventati.org
Use utf8len instead of utf8decode.
noname@inventati.org noname@inventati.org
Make build shut up about system() without return value check. st.c:1321:2: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result] system(cmd); ^~~~~~ ~~~ Debatable whether an error here should case exit(EXIT_FAILURE). Just preserving the existing behaviour for now.
alp@alexpilon.ca alp@alexpilon.ca
Merge remote-tracking branch 'origin/master'
Roberto E. Vargas Caballero k0ga@shike2.com
Fix segmentation fault in strhandle() We cannot pass strescseq.args[0] to atoi when nargs is zero, because in this case it will be null.
Roberto E. Vargas Caballero k0ga@shike2.com
Uses a &[] pointer loop instead of + pointer loop
Roberto E. Vargas Caballero k0ga@shike2.com
Do not set terminal title based on stty arguments.
noname@inventati.org noname@inventati.org
Remove WIN_REDRAW flag. WIN_REDRAW flag was not used since introduction of Xdbe in commit 94771d05886fbdd2422e66b7c0256ab27fa375cb
noname@inventati.org noname@inventati.org
Place memset arguments in the correct order.
noname@inventati.org noname@inventati.org
Remove explicit 'return' from 'void' functions.
noname@inventati.org noname@inventati.org
Increment accuaracy in drawtime calculation This way is a bit more accurate.
noname@inventati.org noname@inventati.org
Monotonic clock cannot jump backwards. The check was introduced back when st used gettimeofday. The condition is also modified to increment the accuaracy of the calculation.
noname@inventati.org noname@inventati.org
Place tlinelen type on separate line.
noname@inventati.org noname@inventati.org
Add tty line support Not always is desirable to create a pseudo terminal, and some times we want to open a terminal emulator over a tty line. With this new patch is possible to do someting like: $ st -l /dev/ttyS0 115200 Without this option was needed to launch another terminal emulator over st (for example minicom, picocom, cu, ...).
Roberto E. Vargas Caballero k0ga@shike2.com
Fix memmove() invocation with src/dst being NULL This fixes a segmentation fault on some systems.
sin sin@2f30.org
Use as command arguments the remaining parameters This change allows execute st as 'st mutt' while it keeps the compability with xterm and urxt.
noname@inventati.org noname@inventati.org
Merge branch 'master' of ssh://suckless.org/gitrepos/st
Roberto E. Vargas Caballero k0ga@shike2.com
tresize: remove unnecessary if
noname@inventati.org noname@inventati.org
Remove old TODO entry. It probably refers to http://lists.suckless.org/dev/1211/13427.html and does not seem like a bug in st.
noname@inventati.org noname@inventati.org
Remove 'titles' variable. We do not free it until exit anyway.
noname@inventati.org noname@inventati.org
Remove useless if in tstrsequence.
noname@inventati.org noname@inventati.org
Simplify tmoveto. LIMIT returns value. This fact is already used in x2col and y2row.
noname@inventati.org noname@inventati.org
Fix typo. It seems that LICENSE files are more common than LICENCE files. At least this patch makes spelling consistent.
noname@inventati.org noname@inventati.org
Remove 'slide' variable in tresize.
noname@inventati.org noname@inventati.org
Move tresize comments around.
noname@inventati.org noname@inventati.org
tresize: move for loop outside if There is no need to check that slide > 0 before executing loop. If slide <= 0, loop stops immediately.
noname@inventati.org noname@inventati.org
Simplify loop condition.
noname@inventati.org noname@inventati.org
Remove unnecessary XFilterEvent call. XFilterEvent usually filters KeyPress events according to input method. At this point the window is not mapped. The only events that we process are ConfigureNotify and MapNotify. They should not be filtered by input method.
noname@inventati.org noname@inventati.org
Use do..while in window mapping loop.
noname@inventati.org noname@inventati.org
Make DECSCUSR thickness configurable
Omar Sandoval osandov@osandov.com
Use MAX macro where possible.
noname noname@inventati.org
Remove 'xloadfontset' function. It was used only once and its return value was ignored.
noname noname@inventati.org
Remove keywords from function definitions.
noname noname@inventati.org
Remove variable names from function declarations.
noname noname@inventati.org
Remove redundant control check control was set, but it was not ever used because it was set again some lines later.
Roberto E. Vargas Caballero k0ga@shike2.com
Fixed STR sequence termination condition ascii code may only be checked for characters that have length equal to 1, not width equal to 1
noname noname@inventati.org
Remove strsep() call strsep() is not a POSIX function, and it means that every system needs different defines to expose it. If the prototype of strsep is not exposed then an ugly int/pointer is done and it might mean a crash. The best solution?, to remove the strsep and make a custom loop. If C programmers cannot do this kind of loops without calling a library function, then maybe we should move all the suckless software to Java.
Roberto E. Vargas Caballero k0ga@shike2.com
Merge remote-tracking branch 'origin/master'
Roberto E. Vargas Caballero k0ga@shike2.com
Support the DECSCUSR CSI escape sequence
LemonBoy thatlemon@gmail.com
Support XA_STRING in notify request Some programs can only deal with XA_STRING, and it makes impossible st be able of copying to them. This patch makes st answer also to XA_STRING, althought it sends utf8 strings. It is not a problem because moderm applications must support utf8.
Roberto E. Vargas Caballero k0ga@shike2.com
TODO: Fix fontconfig
Christoph Lohmann 20h@r-36.net
Add the new selection shortcuts to the manpage.
Christoph Lohmann 20h@r-36.net
Glibc wants me to use _DEFAULT_SOURCe. I do obey.
Christoph Lohmann 20h@r-36.net
Add Mod + Shift + c/v and no selclear. Thanks to Alex Pilon <alp@alexpilon.ca>! Now there is a distinction between the primary and clipboard selection. With Mod + Shift + c/v the clipboard is handled. The old Insert behavious does reside.
Christoph Lohmann 20h@r-36.net
Allow combinations with Backspace XN_ANY_MOD makes that any combination of backspace will return always DEL. This patch lets to X to decide which value returns.
Roberto E. Vargas Caballero k0ga@shike2.com
FAQ: fix wording
Alexander Huemer alexander.huemer@xx.vu
Backspace value shouldn't depend on keypad state
Ivan Delalande colona@ycc.fr
Merge branch 'master' of ssh://suckless.org/gitrepos/st
Christoph Lohmann 20h@r-36.net
St now does only set PRIMARY on selection. http://standards.freedesktop.org/clipboards-spec/clipboards-latest.txt
Christoph Lohmann 20h@r-36.net
Fixing the C reading test. This was a test to see if anyone actually reads what is submitted. The list of people not contributing will be valuable in the future.
Christoph Lohmann 20h@r-36.net
Change the FAQ for the new Backspace behaviour.
Christoph Lohmann 20h@r-36.net
Finally resolving the backspace problem. The majority now using the Linux behaviour. Minorities have to live in their ghettos.
Christoph Lohmann 20h@r-36.net
Add a hack to handle unknown chars in fontconfig. The unicode long is added to the cache. So when fontconfig does fall back to the default font (where there is no easy way to find this out from the pattern) it isn't reloaded.
Christoph Lohmann 20h@r-36.net
Update kdch1 definition to three octal digits. ncurses wasn't able to detect the delete-character key as KEY_DC. This patch fixes that. kdch1 was defined as "\0177", but terminfo(5) states: ... characters may be given as three octal digits after a \. The delete-character key is correctly defined in config.def.h.
Johannes Postma jgmpostma@gmail.com
Small improvements to the FAQ
Roberto E. Vargas Caballero k0ga@shike2.com
document keys in man page
Greg Reagle greg.reagle@umbc.edu
Let curses do the dirty work for flash Use the terminfo delay syntax ($<x>) in our flash capability to avoid hardcoding a fixed delay in redraw() when called from tsetmode() with DECSCNM. We need to turn on the npc capability so that delays are made with xon/xoff instead of padding characters.
Ivan Delalande colona@ycc.fr
Comment default CC assignment CC by default is cc, so the assignment was doing nothing, but it was using non standard syntax, so some system (NetBSD) fail to compile.
Roberto E. Vargas Caballero k0ga@shike2.com
Update dates in LICENSE
Roberto E. Vargas Caballero k0ga@shike2.com
Update year in usage()
Nils Reuße ml@hxgn.net
Fix crash on font resize resize if you keep downsizing your fontsize until either xw.ch or xw.cw gets 0, st crashes, because there is an unchecked division in cresize.
Nils Reuße ml@hxgn.net
Correct shift amount on MODE_INSERT in tputc() When MODE_INSERT is set we'd shift characters on the same line forward before inserting our character in tputc(). This did not account for wide characters where width != 1. This patch makes it so we shift the correct amount.
Rian Hunter rian@alum.mit.edu
Fix crash due to wide characters In tputc(), when a character wasn't large enough to fit on the current line, we would call tnewline() to place it on the next line. Unfortunately, we weren't resetting our glyph pointer and this caused memory corruption when a wide character (width == 2) was being written. This patch resets our glyph pointer after calls to tnewline().
Rian Hunter rian+suckless-dev@thelig.ht
Fix crash due to invalid timespec given to pselect If blinktimeout is set to a value greater than 1000, pselect will receive a timeout argument with tv_nsec greater than 1E9 (1 sec), and fail, making st crash. This patch just ensures that the timespec structure is correctly filled with a value properly decomposed between tv_sec and tv_nsec. Reported by JasonWoof on IRC. Thanks!
Ivan Delalande colona@ycc.fr
Trim trailing whitespaces in every selection case Trailing whitespaces are trimmed when copying from normal selection and rectangular selection on lines that have their last character included or on the left of the selection. It leads to inconsistent behaviors when copying the exact same text from the left and right window in applications with vertical splits. This patch solves this issue by always trimming the selection.
Ivan Delalande colona@ycc.fr
Call _exit() instead of exit() if exec*() fails exit() will also unwind the atexit() functions. This is bad because if exec*() fails the process is in an inconsistent state.
sin sin@2f30.org
Check for presence of SHELL environment variable - POSIX states the SHELL environment variable "... shall represent a pathname of the user's preferred command language interpreter." As such, st should check for its presence when deciding what shell to use; just as HOME can be defined to override one's passwd-defined home directory, a user should also be able to override their passwd-defined shell using the SHELL environment variable.
Eric Pruitt eric.pruitt@gmail.com
Replace character with U+FFFD if wcwidth() is -1 Helpful when new Unicode codepoints are not recognized by libc.
czarkoff@gmail.com czarkoff@gmail.com
Avoid failing when embedding with a Window id of 0 I'd like to let st run with its own window when trying to embed it to a window with id 0 instead of exiting with an error.
Quentin Rameau quinq.ml@gmail.com
Reverting smacs and rmacs to the xterm defaults. These are needed by ncurses to correctly handle the switch between line drawing. The changes to the alternative characterset code already fixed the urwid hack.
Christoph Lohmann 20h@r-36.net
Do not set SHELL to utmp ever SHELL must be set to the SHELL of the user, but it was possible set it to utmp.
Roberto E. Vargas Caballero k0ga@shike2.com
patch for bell in st The XBell() call currently used when a bell is recieved sends a message to the X server, but if the X server doesn't know how to sound it, it just gets ignored and I have not been able to find anywhere in x.org's code a way to configure the action that the server does. However, if you use XkbBell() then you can have a process listening for the XkbBellNotifyEvent that is produced and either alert you visually or play an audio file or whatever you want as your notification. You have to include one more header file but the function seems to be compiled as part of Xlib, at least on my installation. CustaiCo
CustaiCo custaico@openmailbox.org
Use G1 for alternate charset St has enacs, which must be printed if a program requires to use the alternate charset (graphic charset), that in st case was to select charset graphic for G1, but it was not useful at all because smacs and rmacs were always redefining the value of G0.
Roberto E. Vargas Caballero k0ga@shike2.com
Add LS2 and LS3 These sequences are the equivalents of LS0 and LS1, but for G2 and G3.
Roberto E. Vargas Caballero k0ga@shike2.com
Fix SI and SO SI (0x0F or ^O) means Shift In, and it selects G1 charset definition, and SO (0x0E or ^N) means Shift Out, and it selects G0 charset definition, but st was doing just the inverse.
Roberto E. Vargas Caballero k0ga@shike2.com
Removing an extra space.
Christoph Lohmann 20h@r-36.net
Minor style changes for the last patch.
Christoph Lohmann 20h@r-36.net
Implementing xzoomreset. Thanks mvdan@mvdan.cc for proposing this.
Christoph Lohmann 20h@r-36.net
Add missed names of charset sequences
Roberto E. Vargas Caballero k0ga@shike2.com
Add support for utmp in st St runs an interactive shell and not a login shell, and it means that profile is not loaded. The default terminal configuration in some system is not the correct for st, but since profile is not loaded there is no way of getting a script configures the correct values. St doesn't update the utmp files, this is the job of another suckless tool, utmp. Utmp also opens a login shell (it is the logical behaviour when you create a new user record) it is a good option execute utmp and then get a correct input in utmp, wtmp and lastlog file, and execute the content of the profile.
Roberto E. Vargas Caballero k0ga@shike2.com
Remove indentation level in xdrawcursor
Roberto E. Vargas Caballero k0ga@shike2.com
Removing wrapping newlines from selection When getting selected text, lines that were wrapped because of length ought not include the wrapping newline in the selection. This comes up, for example, when copying a bash command that is long enough to wrap from the console and pasting it back into the console. The extra newline breaks it. Similiarly, changes behavior when trimming whitespace from the end of a physical line to only do so if the line does not wrap. Otherwise we are trimming whitespace from the middle of a logical line, which may change its meaning. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Ben Hendrickson ben@1m7.com
Change the behavior of word snapping on delimiters This makes any sequence of identical delimiters be considered a single word in word-snapping mode. This seems more coherent for this mode and is similar to what xterm does. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Ivan Delalande colona@ycc.fr
Move calls to selsnap into selnormalize This simplifies getbuttoninfo() and bpress(), and fixes a bug which made word snapping behave incorrectly when a delimiter was at the beginning or end of line. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Ivan Delalande colona@ycc.fr
Improve readability of enum members The 'left shift from one' notation of power of two integers is more expressive than the result. Signed-off-by: Alexander Huemer <alexander.huemer@xx.vu> Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Alexander Huemer alexander.huemer@xx.vu
Add eschandle() We already have a csihandle() function, where is located code about CSI sequences, so it is logical do the same with ESC sequences. This change helps to simplify tcontrol(), which has a complex flow and should be rewritten.
Roberto E. Vargas Caballero k0ga@shike2.com
Improve execsh() and don't allow anonymous shells This patch improves the shell selection on execsh and forbid shell with users don't registered in the passwd file.
Roberto E. Vargas Caballero k0ga@shike2.com
Fix definition of CONTROLC0 DEL character is not thecnically talking a C0 control character, although it has some common properties with them, so it is useful for us consider it as C0. Before this patch DEL (\177), was not ignored as it ought to be.
Roberto E. Vargas Caballero k0ga@shike2.com
Make useful DEL in application mode DEL key has to generate the sequence ^[P in application mode, because such sequence means delete current character. It implies that the character sent in keypad mode must be ^? (DEL character).
Roberto E. Vargas Caballero k0ga@shike2.com
reset the alt screen in treset Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Quentin Carbonneaux q@c9x.me
simplify loop in tresize Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Quentin Carbonneaux q@c9x.me
Simplify README The term 'virtual terminal emulator' was broken. There is nothing virtual about it, it's a terminal emulator. Signed-off-by: Alexander Huemer <alexander.huemer@xx.vu> Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Alexander Huemer alexander.huemer@xx.vu
Fix man page and usage() Man page was repeating -f option, the second time instead of -i, and this option was lost in usage() message. This patch also indent the output of usage().
Roberto E. Vargas Caballero k0ga@shike2.com
Convert VT102ID to a config variable VT102ID is the sequence that the terminal returns when it is inquired to identify itself. This value should be configurable in the same way that another st parameters.
Roberto E. Vargas Caballero k0ga@shike2.com
Fix portability problem in techo() ISCONTROL chechks if a value is between 0 and 0x1f or between 0x80 and 0x9f. Char signess depends of architecture and compiler, so in some environment the second case is always false (and wrong), Techo() calls ISCONTROL with a char variable, whose type cannot be changed because tpuc() expects a pointer to char, so the solution is to insert a cast in the call to ISCONTROL.
Roberto E. Vargas Caballero k0ga@shike2.com
Don't set dirty all lines because tswapcreen do it Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
noname noname@inventati.org
tresize return value is not used Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
noname noname@inventati.org
Remove ul capability This capability indicates that underscore '_' overstrike current letter under the cursor. It means that you can generate a underline 'b' using 'b^H_', because it writes a 'b' then backward one characther and then overstrike '_'. St has not such behaviour, so it is an error to have this capability.
Roberto E. Vargas Caballero k0ga@shike2.com
Unset mode when clearing regions tclearregion() was clearing regions using spaces and the current attributes of the terminal. It was correct with all the modes excepct underline, because they didn't affect the space character, but in the case of underline it was a problem. A easy way of seeing this problem is writing this in the last line of the terminal: tput smul ; echo first; tput rmul; echo second; echo third Fist was underlined, and second and third were not underlined, but the spaces at the right of second was underlined becuause in the previous scrool underline mode was set.
Roberto E. Vargas Caballero k0ga@shike2.com
Add error message when child exits whit error Master proccess was not showing any error message when the child died with an error, and it was very confusing for the user (for example with incorrect -e command).
Roberto E. Vargas Caballero k0ga@shike2.com
Remove difference between fast and slow blinking One blinking mode is good enough, and two is too much. The best aproach is emulate the fast blinking with the slow blinking, that it is more used. It is removed the flag ATTR_FASTBLINK because it has not a different meaning of ATTR_BLINK, so it is not needed. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Roberto E. Vargas Caballero k0ga@shike2.com
Fix disabling of bold and fastblink According to ECMA-48¹ 8.3.117, an attribute value of 21 is "doubly underlined", while 22 is "normal colour or normal intensity (neither bold nor faint)". Additionally, 25 is "steady (not blinking)", which likely means neither slow blink nor fast blink. ¹: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Michael Forney mforney@mforney.org
Add info about Backspace and Delete to the FAQ Here is a modest attempt at cleaning it up a little bit. I changed a few phrases that seemed awkward, but I think the content is the same. -- Wolfgang Corcoran-Mathe Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Wolfgang Corcoran-Mathe first.lord.of.teal@gmail.com
Add info about Backspace and Delete to the FAQ
Roberto E. Vargas Caballero k0ga@shike2.com
Add information about librt and OpenBSD to the FAQ
Roberto E. Vargas Caballero k0ga@shike2.com
Add information about librt and OpenBSD to the FAQ
Roberto E. Vargas Caballero k0ga@shike2.com
Add information about librt and OpenBSD to the FAQ
Roberto E. Vargas Caballero k0ga@shike2.com
Very minor grammar fixes in FAQ Self-explanatory. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Wolfgang Corcoran-Mathe first.lord.of.teal@gmail.com
Fix st with input method. XFilterEvent need to be called against every event, otherwise it would missing some message in the xim protocol and misbehave on some im server. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Weng Xuetian wengxt@gmail.com
Changed inconsistent indent - A line was indented using spaces despite the rest of the code using tabs. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Eric Pruitt eric.pruitt@gmail.com
Add 8 bit version of DCS, APC, PM, OSC DCS, APC, PM, OSC version for 7 bits environments already was implemented in st. This patch adds the 8 bit version of it.
Roberto E. Vargas Caballero k0ga@shike2.com
Add 8 bit version of HTS HTS version for 7 bits environments already was implemented in st. This patch adds the 8 bit version of it.
Roberto E. Vargas Caballero k0ga@shike2.com
Add 8 bit version of NEL NEL version for 7 bits environments already was implemented in st. This patch adds the 8 bit version of it.
Roberto E. Vargas Caballero k0ga@shike2.com
Add 8 bit version of DECID DECID version for 7 bits environments already was implemented in st. This patch adds the 8 bit version of it.
Roberto E. Vargas Caballero k0ga@shike2.com
Render faint attribute Faint text is implemented by allocating a new color at one-half intensity of each of the r, g, b components, or if the text bold at the same time, it is not made lighter. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com> Signed-off-by: Christoph Lohmann <20h@r-36.net>
Anders Eurenius aes@spotify.com
Remove all strcmp and strlen calls on Glyph.c[] There were a few occurrences of strcmp and strlen being called on Glyph.c[], which is not always null-terminated (this actually depends on the last values in the buffer s in ttyread()). This patch replace all the calls to strcmp with a test on c[0] directly or a call to tlinelen, and the one to strlen with utf8len. I also took the opportunity to refactor getsel and tdumpline. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Ivan Delalande colona@ycc.fr
Making surf compile again with rt. The clock_gettime patch needs librt to be linked to surf. Thanks _odie for the hint.
Christoph Lohmann 20h@r-36.net
Render struck-out attribute Implement crossed-out text with an XftDrawRect call, similar to how underline is implemented. The line is drawn at 2/3 of the font ascent, which seems to work nicely in practice. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Anders Eurenius aes@spotify.com
Render invisible attribute Implement invisible mode by setting the foreground color to be the same as the background color. Not rendering anything would also be an alternative, but this seems less likely to cause surprises in conjunction with any hacks. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Anders Eurenius aes@spotify.com
Reorder and extend glyph attributes Faint, invisible, struck and fast blink are added as glyph attributes. Since there's an edit here, let's take the opportunity to reorder them so that they correspond to the two's power of the corresponding escape code. (just for neatness, let's hope that property never gets used for anything.) Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Anders Eurenius aes@spotify.com
Remove CEIL macro This macro was not correct in some cases, and it was used only in one place, where we did'nt get any benefit in performance of in size, so the macro is removed and ceilf is used instead of it. The only function needed from math.h is ceilf, so this patch defines the prototype of it instead of including math.h.
Roberto E. Vargas Caballero k0ga@shike2.com
Fixed wrong nanosecond factor 10E6. Commit 5edeec1 introduced a wrong factor for nanosecond computation, the correct value is 1E6. Time and timeout values are 10 times less than they should be and this cause high CPU usage. Reported by pyroh on IRC. Thanks! Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Ivan Delalande colona@ycc.fr
Use monotonic clock to prevent timing issues This patch replaces the gettimeofday()/timeval-system with uses of clock_gettime() with a monolithic clock and timespec-structs. gettimeofday() is not accurate and prone to jumps and POSIX.1-2008 marks it as obsolete. Read more here [0]. The patch should speak for itself and decreases the binary size for me by almost 200K(!). [0]: http://blog.habets.pp.se/2010/09/gettimeofday-should-never-be-used-to-measure-time Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
FRIGN dev@frign.de
Fix typo in config.def.h Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Eric Pruitt eric.pruitt@gmail.com
update size hints on zoom On font zooming (i.e. xzoom()), window size hints are not updated. This patch does that. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Troy Sankey sankeytms@gmail.com
Refactor the innermost loop of the xdraws function Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: Christoph Lohmann <20h@r-36.net>
Silvan Jegen s.jegen@gmail.com
FAQ: update typo and escape code for smkx Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Hiltjo Posthuma hiltjo@codemadness.org
Style police.
Christoph Lohmann 20h@r-36.net
Simplify tdeftrans
Roberto E. Vargas Caballero k0ga@shike2.com
Remove unnecessary typedef This should also fix compiling-errors on OpenBSD, as reported by Nils R. Thanks! Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
FRIGN dev@frign.de
Refactor selsnap SNAP_WORD. Refactor the SNAP_WORD part in selsnap, and fix a bug that caused the word delimiters to be ignored if it was at the very beginning or end of a wrapped line. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Colona colona@ycc.fr
Fix rectangular selection. selsort computes the wrong normalized coordinates when rectangular selection is enabled, causing rectangular selection to only work when going toward either the top left corner, or the bottom right one. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Colona colona@ycc.fr
tiny cleanup Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Hiltjo Posthuma hiltjo@codemadness.org
Make selection consistent over line breaks. Currently, selection is expanded to the end of the line over line breaks only in regular selection mode, when the line in not empty and when going down and/or right. This covers all the cases including word selection mode, with the exception of rectangular selection because it would make this mode too rigid. This adjustment is made in selsort so I renamed it to selnormalize to better reflect what it does now. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Colona colona@ycc.fr
Fixing color and refactor xsetcolorname. By the recommendation of FRIGN I refactored xsetcolorname to remove the unnecessary r, g, b variables when allocating a new color. Colors are now freed and set to the new color. A die() should not happen here. Oth‐ erwise it is easy for applications to kill st. St should be resilent to malicious input. Second this patch standardises the naming of »color«. There is no »colour« here. Maybe in some parts of the world.
Christoph Lohmann 20h@r-36.net
Revert "Refactor xsetcolorname()" This reverts commit a32c5f5726f514b49bd396f27aab0e78c40126d3.
Christoph Lohmann 20h@r-36.net
Refactor xsetcolorname() I mainly improved the slightly off algorithm used to load colours in the 256-colour-space and removed unnecessary local values (r,g,b,colour). "colour" is not necessary as a punchbag for XftColorAlloc[Value,Name], as they don't mess with the result-adress until they are absolutely sure everything worked out[0]. Being at it, I changed the error-returns for AllocValue to dies (just like in xloadcols()), as a failure is most likely an OOM-situation you better catch early. In case of an invalid name everything stays the same. [0]: http://www.opensource.apple.com/source/X11libs/X11libs-40/libXft/libXft-2.1.13/src/xftcolor.c Signed-off-by: Christoph Lohmann <20h@r-36.net>
FRIGN dev@frign.de
Don't report release events for mouse wheel Signed-off-by: Christoph Lohmann <20h@r-36.net>
Balazs Kezes rlblaster@gmail.com
Fixing italic bold. Thanks Felipe Spychalski <spychalski@gmail.com> for the patch!
Christoph Lohmann 20h@r-36.net
Fixed copying empty lines inside selection. The code was assuming that empty lines have implicit wrap-around attribute. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Alexander alex0player@gmail.com
Fix some more LICENSE changes.
Christoph Lohmann 20h@r-36.net
Add FRIGN to License, remove trailing whitespace Signed-off-by: Christoph Lohmann <20h@r-36.net>
FRIGN dev@frign.de
Brightening is again on the TODO list.
Christoph Lohmann 20h@r-36.net
Fixing trailing whitespaces.
Christoph Lohmann 20h@r-36.net
Fix colour-model and simplify xloadcols() Signed-off-by: Christoph Lohmann <20h@r-36.net>
FRIGN dev@frign.de
Allow mouse selection override using ShiftMask Similar to xterm or urxvt holding shift before selecting text with the mouse allows to override copying text. For example in tmux with "mode-mouse on" or vim (compiled with --with-x), mc, htop, etc. forceselmod in config.h sets the modifier to use this mode, by default ShiftMask. Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
Hiltjo Posthuma hiltjo@codemadness.org
Redraw needs all dirty lines to have flash etc. work.
Christoph Lohmann 20h@r-36.net
End a sequence only on CAN, SUB, \a and C1s.
Colona colona@ycc.fr
Also clears ESC_START on interrupt characters during sequences. Otherwise, the rest of the input is interpreted as a new escape sequence. For the ESC character, ESC_START is re-set in tcontrolcode.
Colona colona@ycc.fr
Consistent FALLTHROUGH comments.
noname noname@inventati.org
Fix displaying control code Control code are never displayed. It is not important if graphic charset is displayed or not.
Roberto E. Vargas Caballero k0ga@shike2.com
Remove ATTR_GFX and tselcs ATTR_GFX was used long time ago to detect when terminal was in graphic mode. Today graphic mode is implemented using a charset pointer, so ATTR_GFX is not needed anymore because graphic condition can be detected directly checking if current charset is GRAPHICS C0.
Roberto E. Vargas Caballero k0ga@shike2.com
Do not save cursor in tresize. This patch fixes the bug introduced in 8f11e1cd034ff28ca47bb4955505db7fa8016ba8 To reproduce the bug: 1. Save cursor: printf '\e[s' 2. Load cursor: printf '\e[u' 3. Resize st window. 4. Load cursor again: printf '\e[u'
noname noname@inventati.org
Simplify selected().
noname noname@inventati.org
Do not export chscale and cwscale.
noname noname@inventati.org
Simplify xunloadfonts.
noname noname@inventati.org
Remove one indentation level in getsel().
noname noname@inventati.org
Remove unused dump() function.
noname noname@inventati.org
Add missing function prototypes.
noname noname@inventati.org
Use MODBIT in xseturgency.
noname noname@inventati.org
Compute ena_sel as one expression.
noname noname@inventati.org
Simplify expressions in tputc()
Roberto E. Vargas Caballero k0ga@shike2.com
Fix misplaced break This misplaced break was causing an incorrect fall through from DSR to DECSTBM.
Roberto E. Vargas Caballero k0ga@shike2.com
Create a function for DEC test Almost of the sequences execute their action in a separate function, which is good because helps to read the full set of sequences faster.
Roberto E. Vargas Caballero k0ga@shike2.com
Fix tputc control code handling The patch 53105cf modified how control codes were detected, because it tried to handle also C1 control codes (0x80-0x9f), that have upper bit to 1, so they are multi byte character in utf8. Code was checking the value of width in order to known that after decoding the unicode point had a width of 1 byte, but it as incorrect because this width is the columnb width.
Roberto E. Vargas Caballero k0ga@shike2.com
Remove repeated initialisation of term.esc Once a sequence is completed term.esc must return to 0, so instead of repeating this expression in all the cases is better put it at the end of the block.
Roberto E. Vargas Caballero k0ga@shike2.com
Cancel DCS with SUB, CAN, ESC or any CC1 code From http://www.vt100.net/docs/vt510-rm/chapter4: *The VT510 ignores all following characters until it receives a SUB, ST, or any other C1 control character. So OSC, PM and APC sequence ends with a SUB (it cancels the sequence and show a question mark as error), ST or any another C1 (8 bits) code, or their C0 (7 bits) equivalent sequences (at this moment we do not handle C1 codes, but we should). But it is also said that: Cancel CAN 1/8 Immediately cancels an escape sequence, control sequence, or device control string in progress. In this case, the VT510 does not display any error character. Escape ESC 1/11 Introduces an escape sequence. ESC also cancels any escape sequence, control sequence, or device control string in progress.
Roberto E. Vargas Caballero k0ga@shike2.com
add break;s for last cases in switch statements
Markus Teich markus.teich@stusta.mhn.de
Do not eat ESC character if control string is not properly terminated. Currently tputc handles the case of too long control string waiting for the end of control string. Another case is when there is ESC character is encountered but is not followed by '\\'. In this case st stops processing control string, but ESC character is ignored. After this patch st processes ESC characters in control strings properly. Test case: printf '\e]0;abc\e[1mBOLD\e[0m' Also ^[\ is actually processed in the code that handles ST. According to ECMA-048 ST stands for STRING TERMINATOR and is used to close control strings.
noname noname@inventati.org
Fix for multibyte characters in techo. Works for both signed and unsigned char.
noname noname@inventati.org
s/DSC/DCS/ DCS stands for DEVICE CONTROL STRING
noname noname@inventati.org
Use xwrite instead of write.
noname noname@inventati.org
Remove unnecessary break
noname noname@inventati.org
Comment fix.
noname noname@inventati.org
On terminal resize, clear the alt screen with its own cursor. Currently the alternate screen get messed up on resize if it has different colors or mode.
Colona colona@ycc.fr
Optimize tputtab. Before this patch executing printf '\e[10000000000I' or printf '\e[10000000000Z' resulted in long delay.
noname noname@inventati.org
Use != instead of ^ for logical values. sel.alt is only changed by sel.alt = IS_SET(MODE_ALTSCREEN);
noname noname@inventati.org
Use BETWEEN macro in xsetcolorname and fix style.
noname noname@inventati.org
Conformity in the -g geometry handling. Thanks to Yuri Karaban for suggesting this! These changes make -g correspond to <cols>x<rows> and honor it so non-tiling window managers can work with the size hints afterwards. It also adds a -i flag to force the window size. This is needed so -g keeps being useful in dwm.
Christoph Lohmann 20h@r-36.net
Simplify a bit more tdeletechar and tinsertblank The large and repeated expression used in memmove to indirect the line can be simplified using a pointer, that makes more clear where begins and where ends the movement.
Roberto E. Vargas Caballero k0ga@shike2.com
Simplify tdeletechar and tinsertblank and fix memory corruption. Current CSI parsing code uses strtol to parse arguments and allows them to be negative. Negative argument is not properly handled in tdeletechar and tinsertblank and results in memory corruption in memmove. Reproduce with printf '\e[-500@' Patch also removes special handling for corner case and simplifies the code. Removed term.dirty[term.c.y] = 1 because tclearregion sets dirty flag.
noname noname@inventati.org
Style fixes in tscrollup.
noname noname@inventati.org
Do not set dirty flag twice in tscrollup and tscrolldown.
noname noname@inventati.org
Use tsetdirt in tscrollup and tscrolldown. tscrollup and tscrolldown do not use tsetdirt, but their code is equivalent to tsetdirt(orig, term.bot-n); tsetdirt(orig+n, term.bot); tclearregion also marks cleared lines as dirty. In tscrolldown it sets lines from term.bot-n+1 to term.bot dirty, and in tscrollup it sets lines from orig to orig+n-1 dirty. In both functions all lines from orig to term.bot are effectively set dirty, but in tscrolldown lines from orig+n to term.bot are set dirty twice, and in tscrollup lines from orig to term.bot-n are set dirty twice. These patches make it clear which lines are set dirty and sets them dirty once in each funciton.
noname noname@inventati.org
Fix techo handling of control and multibyte characters. techo compares signed char to '\x20'. Any character with code less then '\x20' is treated as control character. This way characters with MSB set to 1 are considered control characters too. Also this patch makes techo display DEL character as ^?. To reprocuce the bug, enable echo mode using printf '\e[12l', then type DEL character or any non-ASCII character.
noname noname@inventati.org
Make xrealloc and xstrdup style consistent.
noname noname@inventati.org
Use BETWEEN in tsetchar.
noname noname@inventati.org
Use uint and uchar instead of unsigned int and unsigned char.
noname noname@inventati.org
Remove argument names from function prototypes.
noname noname@inventati.org
Style fix in tdumpsel.
noname noname@inventati.org
Use BETWEEN in tinsertblankline and tdeleteline.
noname noname@inventati.org
It's 2014 now.
Christoph Lohmann 20h@r-36.net
move MODBIT to Macros section Patch moves MODBIT to macros section and uses it in tselcs.
noname@inventati.org noname@inventati.org
misplaced parenthesis in LEN macro
noname@inventati.org noname@inventati.org
remove confusing SERRNO macro I found the SERRNO Macro slightly confusing, since you have to look it up, if you don't know it already. A web search showed it does not seem to be any kind of standard. Also there was no reason in the commit log when it was introduced in 2009. As you can see it also leads to new patches, which don't use this macro (probably the author did not know about it).
Markus Teich markus.teich@stusta.mhn.de
Simplify techo Remove special case for \e because it is handled well by "control code" case.
noname@inventati.org noname@inventati.org
typedefs instead of #defines Replaced #defines with typedefs where possible, patch attached.
noname@inventati.org noname@inventati.org
fix cursor handling when alt screen is disabled I don't like this alt screen thing, but when allowaltscreen == 0, the cursor is still saved and restored after calling 'less' (or 'man'). This patch makes allowaltscreen == 0 usable.
q@c9x.me q@c9x.me
Merge remote-tracking branch 'origin/master' into omaster
Roberto E. Vargas Caballero k0ga@shike2.com
Increment XSync consistency This patch cleans up a style inconsistency.
Toaster Toaster toaster23456@gmail.com
Fix Backspace and Delete characters Backspace key must generate the backspace character (\010) and Delete key must generate the delete character (\0177). In some systems the kernel configuration for erasing previous character is \0177, so some programs (for example cat, ed, mail, ...), can not understand the correct meaning of backspace. In this cases it is only needed this command: stty erase
Roberto E. Vargas Caballero k0ga@shike2.com
0.5 release.
Christoph Lohmann 20h@r-36.net
Updating the TODO in preparating for 0.5.
Christoph Lohmann 20h@r-36.net
There is no need for a full dirt redraw.
Christoph Lohmann 20h@r-36.net
Fixing a compiler warning with the assignment.
Christoph Lohmann 20h@r-36.net
Fix segfault when pressing PrintScr without a selection
Rafa Garcia Gallego rafael.garcia.gallego@gmail.com
new utf decoder This patch replaces current utf decoder with a new one, which is ~50 lines shorter and should be easier to understand. Parsing 5 and 6 sequences, if necessary, requires trivial modification of UTF_SIZ constant and utfbyte, utfmask, utfmin, utfmax arrays.
Damian Okrasa dokrasa@gmail.com
Merge branch 'master' of ssh://suckless.org/gitrepos/st
Roberto E. Vargas Caballero k0ga@shike2.com
Add terminfo entries for printer These capabilities inform to programs how print in local printer of the terminal.
Roberto E. Vargas Caballero k0ga@shike2.com
Add sequence for printing the current selection This is very usefull in order to can select what is sent to the plumber.
Roberto E. Vargas Caballero k0ga@shike2.com
Add key definition for printer sequences These new combinations generate the same behaviour (basically) of vt102. It is a good way of communicating st with other programs. [0] http://www.vt100.net/docs/vt102-ug/chapter2.html
Roberto E. Vargas Caballero k0ga@shike2.com
Add MC for the full screen This sequence is very useful because allows comunicate the content of the terminal to another program.
Roberto E. Vargas Caballero k0ga@shike2.com
Add MC for a single line This sequence print the current line. It is different to the 'printer on' sequence, where all the characters that arrive to the terminal are printer. Here only the ascii characters are printed.
Roberto E. Vargas Caballero k0ga@shike2.com
Add MC sequence This sequence control when the printer is enabled or disabled. This sequence control the behaviour of the -o option.
Roberto E. Vargas Caballero k0ga@shike2.com
Add xstrdup function Since we are using xmalloc, xrealloc ..., then it is not logical call directly to strdup. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Roberto E. Vargas Caballero k0ga@shike2.com
Merge remote-tracking branch 'origin/master'
Roberto E. Vargas Caballero k0ga@shike2.com
Remove non defined behaviour in selcopy It is not defined when lateral effects of expressions are calculated, so an expression as: --last >= gp && !(selected(last - gp, y) is non portable.
Roberto E. Vargas Caballero k0ga@shike2.com
Remove duplicated code in strhandle The error condition was duplicated in two different switches. This new version centralized the error handling in only one place.
Roberto E. Vargas Caballero k0ga@shike2.com
Make Shift+Home equal to CLS in ascii mode
Roberto E. Vargas Caballero k0ga@shike2.com
Make CONTROL + DELETE delete a line If CONTROL + INSERT inserts a line then it seems natural CONTROL + DELETE removes a line.
Roberto E. Vargas Caballero k0ga@shike2.com
Fix SHIFT+DEL definition The AppMode and AsciiMode were inverted in the definition of this combination. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Roberto E. Vargas Caballero k0ga@shike2.com
Use character scaling in XCopyArea
Eric Pruitt eric.pruitt@gmail.com
Make w3mimgdisplay work with st Before this patch draw() calls drawregion which calls xdraws and then updates whole window in one call thus overdrawing anything drawn by w3mimgdisplay. After moving XCopyArea to xdraws it only updates the regions which are being updated by XftDraw* functions. It may do a few more calls to XCopyArea with this patch. Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Amadeusz Sławiński amade@asmblr.net
Fix truecolor escapes, when both bg and fg are set for example echo -e "\e[48;2;255;0;0m\e[38;2;0;0;255m test " should render on red bg with blue fg also now elinks works correctly when using 'truecolor' option in preferences Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Amadeusz Sławiński amade@asmblr.net
query pixel size from matched font Sorry for another duplicated mail. I found the patch is malformed significantly. I've been away from my laptop for a while, so I'm quite unfamiliar with the settings on this system...
Eon S. Jeon esjeon@hyunmu.am
Update arg.h from sbase sbase did some interesting modifications to arg.h (basically it was fixed an incorrect use of the _ namespace), and this commit take this last version for st.
Roberto E. Vargas Caballero k0ga@shike2.com
Prevent resizing stdin This fixes a bug that the parent tty gets resized whenever you launch st through command line. The problem was that ioctl was resizing cmdfd before it gets initialized in ttynew. Since cmdfd is a global variable, its initial value is 0, and consequently stdin was being resized.
Eon S. Jeon esjeon@hyunmu.am
Replace alignment tabs with spaces.
Mark Edgar medgar123@gmail.com
Fix comments in config.def.h to match field names.
Mark Edgar medgar123@gmail.com
Fix definition of F28 key. Shitf modifier adds 12 to the function number of the function keys, while Control adds 24, so Control + F4 generates F28
Mark Edgar medgar123@gmail.com
Set _NET_WM_PID attribute
Eric Pruitt eric.pruitt@gmail.com
Fix rmul definition rmul means "exit underline mode", so a full reset of all the attributes is not the correct way of exiting from underline mode, because it is going to modify also another attributes not related.
Eric Pruitt eric.pruitt@gmail.com
Add stdint include Since st is using now int32_t and uint32_t the inclusion of stdint or inttype is mandatory, because in other case the definition of these new types will not be known by the compiler.
René Rietz rrietz@informatik.tu-cottbus.de
Fix stupid bug in tdefcolor returning -1 in unsigned function k0ga misktook applying patch of others. Sorry guys!!!!
Roberto E. Vargas Caballero k0ga@shike2.com
Use int instead of long for color This patch replaces long by int32_t. It saves some memory on 64bit systems.
Johannes Hofmann johannes.hofmann@gmx.de
add _NET_WM_NAME
Carlos J. Torres vlaadbrain@gmail.com
Simplify logic in kmap().
Mark Edgar medgar123@gmail.com
Simplify logic in match().
Mark Edgar medgar123@gmail.com
Merge remote-tracking branch 'origin/master' into omaster
Roberto E. Vargas Caballero k0ga@shike2.com
Ignore numlock (Mod2Mask) for button events too. Conflicts: config.def.h st.c
Mark Edgar medgar123@gmail.com
Avoid buffer overrun in bpress() Use correct type for Mousekey.b (XButtonEvent.button).
Mark Edgar medgar123@gmail.com
New ttysend() function calls ttywrite() and techo(). Honor MODE_ECHO when pasting in selnotify().
Mark Edgar medgar123@gmail.com
Avoid buffer overrun in kpress() and remove limit on shortcut strings.
Mark Edgar medgar123@gmail.com
Simplify Mod1 logic in kpress(), eliminating locals and a memcpy.
Mark Edgar medgar123@gmail.com
Add support for multiple charset definitions vt100 has support for two defined charset, G0 and G1. Each charset can be defined, but in each moment is selected only one of both charset. This is usually used selecting a national charset in G0 and graphic charset in G1, so you can switch between graphic charset and text charset without losing the national charset already defined. st hasn't support for national charsets, because it is an utf8 based terminal emulator, but it has support for graphic charset because it is heavily used, but it only supports G0, without understanding G1 selection sequences, which causes some programs in some moments can print some garbage in the screen. This patch adds a fake support for multiple charset definitions, where we only support graphic charset and us-ascii charset, but we allow more of one charset definition. This patch allow define G0 until G3 charsets, but only accepts select G0 or G1, and it accepts some national charset definitions but all of them are mapped to us-ascii.
Roberto E. Vargas Caballero k0ga@shike2.com
People, learn to keep to styles. Thanks.
Christoph Lohmann 20h@r-36.net
Fix save/restore cursor st was assuming that save/restore cursor position was independent of the screen that was shown in each moment, but it is not true, because each screen has a different save/restore buffer. This patch fixes it.
Mihail Zenkov mihail.zenkov@gmail.com
Add DSR cursor position sequence
Mihail Zenkov mihail.zenkov@gmail.com
Fix core in multi-line selection on OpenBSD OpenBSD 5.3 amd64 release version with the most current st version from git, crash and dump core when selecting multiple lines whith the cursor. This happens, because on line 964 of st.c (gp-1)->mode is accessed, although gp is still pointing at the beginning of the array term.line[y] (see line 939 for initialization of gp).
Maurice Quennet mjq@gmx.net
Add bracketed paste mode This patch enables bracketed paste mode ( http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#Bracketed%20Paste%20Mode ). It's mainly useful for text editors to disable line wrapping and auto indentation when text is being pasted, rather than typed from keyboard. On the emulator side, it is supported by at least xterm, urxvt, gnome-terminal, putty, iterm2; and I have a patch for konsole. On the application side, vim can be configured easily to handle this, and I have pending patches for mcedit and joe. Probably many others also support it.
Egmont Koblinger egmont@gmail.com
Fix some bugs in mouse tracking logic * Button number in X10 mode: I believe the button - 1 came from "C b is button - 1" from [0]. However, above this section, it states "Normally, parameters (such as pointer poisition and button number) for all mouse tracking escape sequences generated by xterm encode numeric parameters in a single character as value+32. For example, ! specifies the value 1." Also, from the description of SGR, "The encoded button value in this case does not add 32 since that was useful only in the X10 scheme for ensuring that the byte containing the button value is a printable code." This suggests that we should still add 32 to the button value when in MODE_MOUSEX10. * No button release reporting in X10 mode: "X10 compatibility mode sends an escape sequence only on button press, encoding the location and the mouse button pressed." * Fix MODE_MOUSEMOTION: Currently, motion reporting is skipped when oldbutton == 3 (corresponding to no button being pressed). However, oldbutton is only set on a button press, which will never be 3. [0]: http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
Michael Forney mforney@mforney.org
Default volume of the bell is 0.
Christoph Lohmann 20h@r-36.net
Add audible bell \a is the character for bell, and st is only marking the window as urgent if it is not active. This patch adds an audible bell which can be disable with bellvolume variable. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Roberto E. Vargas Caballero rvargas@bsccs347.bsc.es
Wide character support. Thanks "Eon S. Jeon" <esjeon@hyunmu.am>!
Christoph Lohmann 20h@r-36.net
Adding some contributors. Thanks to you all!
Christoph Lohmann 20h@r-36.net
Correctly initialize altscreen when defaultbg is not 0. The alternate screen is not properly initialized when st starts. To see this, set defaultbg in config.h to anything other than 0 (for example, swap defaultfg and defaultbg), and run: ./st -e sh -c 'tput smcup; read' You should see that the top-left 80x24 rectangle is black (or whatever colorname[0] is), while the rest of the screen (if any) has the desired colorname[defaultbg] color. The attached patch fixes this by initializing term.c.attr in tnew() before calling tresize(). It also removes the unnecessary xcalloc() calls, which misled me on this bug hunt since it is really tclearregion() which initializes term.lines and term.alt in tresize().
Mark Edgar medgar123@gmail.com
Regarding commit 7e3cff3 Hello. I reviewed and tested commit 7e3cff3, and made a patch that fixes some problems in it. 1. There's a semicolon after an if statement, which is obviously a typo. 2. The current way of calculating text position in "xdraws" yields inconsistent results in some cases. This is due to the use of "font->width", which varies. Instead, "xw.cw" has to be used as the character width. Sincerely, Eon
Eon S. Jeon esjeon@hyunmu.am
Tmux is using C-b by default. Thanks for noticing Fidel Barrera Cruz!
Christoph Lohmann 20h@r-36.net
Correcting the bitmask value check.
Christoph Lohmann 20h@r-36.net
Add terminfo definitions for terminals with meta key Some programs don't check the value of km and use smm and rmm capabilites, and they cause the terminal change to meta enabled mode even in cases where is not desirable. Allmost all people is using the terminal waiting that meta sends escape, so rmm and smm are not needed. If someone needs meta sets 8 bit he can use the correct terminfo definition in TERM.
Roberto E. Vargas Caballero k0ga@shike2.com
Fix signess of tdefcolor tdefcolor() returns -1 on error, while its return type is unsigned long. At the same time, line 1724 and 1731 are checking the positivity of its unsigned return value.
Eon S. Jeon esjeon@lavabit.com
Fixed memory leak in xsettitle().
Alexander Sedov alex0player@gmail.com
Fix blink mode check ATTR_BLINK is an attribute for a Glyph and will not be set in term.mode.
Michael Forney mforney@mforney.org
Use character size scaling factors The bounding boxes for characters can be scaled using "cwscale" and "chscale" to scale the width and height respectively.
Eric Pruitt eric.pruitt@gmail.com
Reload colors in reset Colors definition can be changed using a OSC sequence, so we have to reload them if we want be sure all the colors are the correct. Could be desirable free the colors allocated due to rgb colors and inverse colors (XftColorAllocValues in xdraws), but it is impossible due we use the same structure for all of them.
Roberto E. Vargas Caballero k0ga@shike2.com
Add RGB color definition This patch uses the bit 24 in the color descriptor as an indicator of RGB color, so we can take the values and generating the XftColour directly in xdraws.
Roberto E. Vargas Caballero k0ga@shike2.com
Improved font caching I made a patch that improves the performance of font caching mechanism. This is based on a funny behaviour of FontConfig: it was handling FcCharSet in a somewhat unexpected way. So, we are currently adding "a character" to a new FcCharSet, and then add it to a FcPattern. However, if we toss the FcPattern to FontConfig, it loads the entire language(charset) that contains the character we gave. That is, we don't always have to load a new font for each unknown character. Instead, we can reused cached fonts, and this significantly reduces the number of calls to extremely slow FontConfig matching functions. One more thing. I found that, in libXft, there's a function called XftCharExists. XftCharIndex internally calls this function, and does more stuffs if the character does exist. Since the returned index is never used in st, we should call XftCharExists instead of XftCharIndex. Please note that I already made this change in the patch.
Eon S. Jeon esjeon@lavabit.com
fix: whitespace
Markus Teich markus.teich@stusta.mhn.de
Remove long text being cropped/wrapped to standard 80x24 on launch. To be more specific, now tty creation is delayed until X window is actually mapped; last ConfigureNotify before mapping determines initial tty size. Please report problems if there are any.
Alexander Sedov alex0player@gmail.com
fix: consistent usage of bitmask operations on unicode functions
Markus Teich markus.teich@stusta.mhn.de
fix: do not need an extra variable for a single read
Markus Teich markus.teich@stusta.mhn.de
Fix match function bugs There were two problems with match denfinition. 1) There was a forward declaration in the form: static inline bool match(uint, uint); but later the function was defined as: inline bool match(uint mask, uint state) { This causes that there were two different functions in the code, one local and inline, and other inline but extern. All was working without problems due to we were using -Os, and the compiler was using the extern definition and it was no expanding the static declaration. If you removed the -Os flag, then you got linker errors due it was no able to find the static definition of the static declaration. 2) The mask checking was incorrect because we were doing the test: (state & mask) != state and this test only was saying that at least all the enabled bits of state were enabled also in mask, but no all the possible bits in mask. This was the origin of the bug reported by Xavier Cartron, where he said it was possible activated some shortcuts with some of the modifiers defined in the config.h file.
Roberto E. Vargas Caballero k0ga@shike2.com
Remove unneded call to draw draw is the function which update the Xwindow with the information st has, and it is designed in a way that it must be called once in the main loop (run function), and calling it in other places it is a waste of time.
Roberto E. Vargas Caballero k0ga@shike2.com
Fix selection clearing The way st knows if there is a selection activated is checking if sel.ob.x is equal to -1. In some parts of the code the way of disabling the selection was only setting it to -1, but after it you can't be sure if the selection is clearing from the terminal representation, because it is necessary mark all the lines affected by the selection as dirty. Already there is a functon which perform this task, selclear.
Roberto E. Vargas Caballero k0ga@shike2.com
fix PageUp Modifier Mask in config.def.h Signed-off-by: Christoph Lohmann <20h@r-36.net>
Markus Teich teichm@fs.tum.de
Fixing title setting with the title argument.
Christoph Lohmann 20h@r-36.net
Adding xterm behaviour to setting the title. Thanks Airwave!
Christoph Lohmann 20h@r-36.net
Bumping up the xfps so mouse motion won't reap the CPU.
Christoph Lohmann 20h@r-36.net
Adding true mouse motion support.
Christoph Lohmann 20h@r-36.net
This is a shorter bit handling in MODE_MOUSE.
Christoph Lohmann 20h@r-36.net
Add some comments about the other mouse reporting modes.
Christoph Lohmann 20h@r-36.net
Implementing mouse focus and all events.
Christoph Lohmann 20h@r-36.net
Fixing bad highlighting on first SNAP_WORD multiline select.
Christoph Lohmann 20h@r-36.net
Fixing the selection in a single line again. Thanks p37sitdu@lavabit.com!
Christoph Lohmann 20h@r-36.net
Fixing the selection scrolling and the selection naming. Thanks p37sitdu@lavabit.com!
Christoph Lohmann 20h@r-36.net
Lazy font unloading too.
Christoph Lohmann 20h@r-36.net
Lazy fontset loading. Thanks Johannes Hofmann <Johannes.Hofmann@gmx.de>!
Christoph Lohmann 20h@r-36.net
Removing an old select() regression.
Christoph Lohmann 20h@r-36.net
Allow more complex delimiters for word selections. Thanks Alexander Rezinsky <alexrez@gmail.com>!
Christoph Lohmann 20h@r-36.net
Expand the last line with '\n' in case of overselection. Thanks Alexander Rezinsky <alexrez@gmail.com>!
Christoph Lohmann 20h@r-36.net
Select to the end of row if end of line is reached. Thanks Alexander Rezinsky <alexrez@gmail.com>!
Christoph Lohmann 20h@r-36.net
Better comments for the snapping code.
Christoph Lohmann 20h@r-36.net
More stable blinking.
Christoph Lohmann 20h@r-36.net
Explaining blinking for the dummies.
Christoph Lohmann 20h@r-36.net
Selection snapping is now considering wrapping. Thanks Alexander Rezinsky <alexrez@gmail.com> for mentioning this!
Christoph Lohmann 20h@r-36.net
Add a possibility to modify the string sent by mouse buttons. Thanks Alexander Rezinsky <alexrez@gmail.com> for the suggestion!
Christoph Lohmann 20h@r-36.net
Be more efficient in blinking.
Christoph Lohmann 20h@r-36.net
Enable blinking in st.
Christoph Lohmann 20h@r-36.net
Fixing the selection handling to allow one char selection. Thanks Alexander Sedov <alex0player@gmail.com> for suggesting the fix!
Christoph Lohmann 20h@r-36.net
Fixing the selection issue in altscreens.
Christoph Lohmann 20h@r-36.net
Removed redundant check in draw code. We're now clearing empty areas with spaces, so there is no point to check if character contains non-empty string. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Alexander Sedov alex0player@gmail.com
Fix selecting clearing and BCE The commit b78c5085f72 changed the st behaviour enabling BCE capability, that means erase regions using background color. Problem comes when you clear a region with a selection, because in this case the real mode of the Glyph is not the value of term.line[y][x], due in drawregion we had enabled the ATTR_REVERSE bit. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Roberto E. Vargas Caballero k0ga@shike2.com
Now clipping is more clear.
Christoph Lohmann 20h@r-36.net
Removing the overdrawing of some fonts.
Christoph Lohmann 20h@r-36.net
Yes, rs2 != is2.
Christoph Lohmann 20h@r-36.net
There is no 8bit by default and reset 8bit too.
Christoph Lohmann 20h@r-36.net
Implementing 8 bit mode for meta.
Christoph Lohmann 20h@r-36.net
Adding wrap handling in selection.
Christoph Lohmann 20h@r-36.net
Added support for double/triple click+dragging. Now double-click+dragging automatically snaps both ends to word boundaries (unless on series of spaces), and triple-click selects whole lines. As a side effect, snapping now occurs on button press, not button release like it previously was, but I hope that won't be inconvenient for anyone. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Alexander Sedov alex0player@gmail.com
0.4.1 release.
Christoph Lohmann 20h@r-36.net
Making st compile on OpenBSD again.
Christoph Lohmann 20h@r-36.net
Selection now handles empty lines less counter-intuitively. Now, when you are selecting a region, you will get all empty lines that happen to be in it, including trailing ones. Last line terminator is omitted as it previously was, though. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Alexander Sedov alex0player@gmail.com
Removing trailing whitespace.
Christoph Lohmann 20h@r-36.net
Got rid of redundant Glyph state. Now, newly allocated Glyphs are set to spaces and current cursor colors with tclearregion() routine. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Alexander Sedov alex0player@gmail.com
Removing unneeded comments.
Christoph Lohmann 20h@r-36.net
Got rid of code duplication in tnew() and tresize(). Signed-off-by: Christoph Lohmann <20h@r-36.net>
Alexander Sedov alex0player@gmail.com
Strip trailing spaces from lines when copying selection. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Alexander Sedov alex0player@gmail.com
Enable BCE everywhere.
Christoph Lohmann 20h@r-36.net
Fix the geometry handling.
Christoph Lohmann 20h@r-36.net
\033 should be used in printf in the FAQ. Never apply patches of Apple users without shouting at them. The basic rule of nature is that when you apply Appl users patches without shouting at them that something will go horribly wrong.
Christoph Lohmann 20h@r-36.net
Resize now uses xclear().
Christoph Lohmann 20h@r-36.net
Drawing a more visible rectangle as cursor on unfocus. To have a more visible cursor on unfocused windows this patch makes st draw a rectangle around the terminal cell. Thanks Mark Hills <mark@xwax.org> for the suggestion!
Christoph Lohmann 20h@r-36.net
Patching while not really woken up.
Christoph Lohmann 20h@r-36.net
Minor naming issue fixed.
Christoph Lohmann 20h@r-36.net
Making the copy and pasting consistent. The copying and pasting in the terminald and GUI world is flawed. Due to the discussion on the mailinglist it seems that sending '\n' is what GUIs expect and '\r' what terminal applications want. St now implements that behaviour.
Christoph Lohmann 20h@r-36.net
Convert FAQ into Markdown, to make it easier to integrate it into http://st.suckless.org/ Signed-off-by: Christoph Lohmann <20h@r-36.net>
Kai Hendry hendry@webconverger.com
Make st work with a plain -e command.
Christoph Lohmann 20h@r-36.net
Adopting arg.h with more flexible cmd handling.
Christoph Lohmann 20h@r-36.net
Add an option to disable alternative screens.
Christoph Lohmann 20h@r-36.net
Updating the TODO file for after 0.4.
Christoph Lohmann 20h@r-36.net
Releasing 0.4.
Christoph Lohmann 20h@r-36.net
Add the possibility to have default highlight colors. Thanks to stargrave@stargrave.org for the suggestion!
Christoph Lohmann 20h@r-36.net
Adding PgUp + Ctrl. Thanks stargrave@stargrave.org!
Christoph Lohmann 20h@r-36.net
Adding PgUp and PgDown + Ctrl to config.def.h Thanks stargrave@stargrave.org!
Christoph Lohmann 20h@r-36.net
Removing an undefined case. just do regular selections.
Christoph Lohmann 20h@r-36.net
Making rectangular selection work again. People sending me patches against strange revisions and basing on their own revisions make me having to reapply them. Then such errors appear. Thanks Alexander Sedov <alex0player@gmail.com> for noticing this.
Christoph Lohmann 20h@r-36.net
Pange seems to use ascent + descent instead of height. Thanks Bobby Powers <bobbypowers@gmail.com> for noticing this!
Christoph Lohmann 20h@r-36.net
Making st compile on OS X.
Christoph Lohmann 20h@r-36.net
Using strsep and fixing null termination in csiparse. Thanks for the hint from Alexander Sedov <alex0player@gmail.com>!
Christoph Lohmann 20h@r-36.net
Changing the way how paste is handled, just for the nano people.
Christoph Lohmann 20h@r-36.net
Fixing a bug while parsing empty arguments in csiparse.
Christoph Lohmann 20h@r-36.net
Fixing bugs in the strtol and strtok_r replacements. Thanks "Roberto E. Vargas Caballero" <k0ga@shike2.com> for the comments!
Christoph Lohmann 20h@r-36.net
Using strtok_r for the string parsing.
Christoph Lohmann 20h@r-36.net
Using strtol with overflow checking.
Christoph Lohmann 20h@r-36.net
Add insert for the primary clipboard to MOD + Shift + Ins. Thanks Mantas Mikulėnas <grawity@gmail.com> for the patch!
Christoph Lohmann 20h@r-36.net
Removing dbe and introducing umlauts to titles. Thanks Alexander Sedov <alex0player@gmail.com> for the title patch!
Christoph Lohmann 20h@r-36.net
Add umlaut support for title change. Thanks Alexander Sedov <alex0player@gmail.com>!
Christoph Lohmann 20h@r-36.net
Replace parse_int with atoi().
Christoph Lohmann 20h@r-36.net
Added basic xterm-ish palette swap support. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Alexander Sedov alex0player@gmail.com
Implement rectangular mouse selection. Thanks Alexander Sedov <alex0player@gmail.com>!
Christoph Lohmann 20h@r-36.net
ensure that the italic font has the same weight as the normal font The specified font[] pattern need not have a medium weight. It could be specified as a number too or have a different weight other than medium. Signed-off-by: Christoph Lohmann <20h@r-36.net>
joe9 joe9mail@gmail.com
Style inquisition.
Christoph Lohmann 20h@r-36.net
Fixing the reverse mode of st colors. Thanks Alexander Sedov <alex0player@gmail.com> for finding this!
Christoph Lohmann 20h@r-36.net
Adding a way to ignore bits in the state.
Christoph Lohmann 20h@r-36.net
Style inquisition.
Christoph Lohmann 20h@r-36.net
The refresh rate for the action needs to be high too.
Christoph Lohmann 20h@r-36.net
Changing the fps to something reasonable high.
Christoph Lohmann 20h@r-36.net
Doing it like the new run() was proposed.
Christoph Lohmann 20h@r-36.net
Adding a more efficient drawing code. Thanks Mihail Zenkov <mihail.zenkov@gmail.com> for giving the hint!
Christoph Lohmann 20h@r-36.net
Tmux wants this to be mutually exclusive. Thanks Egmont Koblinger <egmont@gmail.com> for noticing this!
Christoph Lohmann 20h@r-36.net
Adding mor explict font patterns.
Christoph Lohmann 20h@r-36.net
Making st not activate the cursor in case of Mod + k in dwm. Thanks Jens Nyberg <jens.nyberg@gmail.com>!
Christoph Lohmann 20h@r-36.net
Setting the surrounding border to defaultbg. Thanks Stephen Caraher <moskvax@gmail.com>!
Christoph Lohmann 20h@r-36.net
Removing some debug messages.
Christoph Lohmann 20h@r-36.net
Fixing the menus in mc.
Christoph Lohmann 20h@r-36.net
Fixing the black remaining lines in mc and dialog. This also applies some style fixes and handles some old blink codes.
Christoph Lohmann 20h@r-36.net
Adding extended mouse reporting in st. Thanks Egmont Koblinger <egmont@gmail.com>!
Christoph Lohmann 20h@r-36.net
Removing the debug messages again.
Christoph Lohmann 20h@r-36.net
Fixing the clipboard copying to st itself.
Christoph Lohmann 20h@r-36.net
St is in 2013 now.
Christoph Lohmann 20h@r-36.net
Removing BCE from the TODO list.
Christoph Lohmann 20h@r-36.net
Implementing Back Color Erase (BCE).
Christoph Lohmann 20h@r-36.net
Make line drawing work again.
Christoph Lohmann 20h@r-36.net
Yes, xft should be on the buffer. Thanks Mihail Zenkov.
Christoph Lohmann 20h@r-36.net
Trying out the double buffering without dbe.
Christoph Lohmann 20h@r-36.net
Dbe is not required anymore.
Christoph Lohmann 20h@r-36.net
Adding the FAQ entry for zsh. Thanks Roberto E. Vargas Caballero! You were committing this patch against the wrong version of the FAQ, so I had to rewrite it.
Christoph Lohmann 20h@r-36.net
The title can now be set with UTF-8 characters. Thanks Mihail Zenkov <mihail.zenkov@gmail.com>!
Christoph Lohmann 20h@r-36.net
Adding a nasty resize bug. Maybe it can be fixed.
Christoph Lohmann 20h@r-36.net
Removing the .hgtags file. Thanks ilf.
Christoph Lohmann 20h@r-36.net
Standout mode has changed. Thanks p37sitdu@lavabit.com!
Christoph Lohmann 20h@r-36.net
A different double buffering strategy so the background is default set.
Christoph Lohmann 20h@r-36.net
Standout is now reverse. This makes bsd-games work in st.
Christoph Lohmann 20h@r-36.net
Adding an FAQ entry for the keypad handling. Thanks "Roberto E. Vargas Caballero" <k0ga@shike2.com>!
Christoph Lohmann 20h@r-36.net
Synchronizing the FAQ of the website and the repository.
Christoph Lohmann 20h@r-36.net
Damn, my fault. The cache should have at least some entries.
Christoph Lohmann 20h@r-36.net
Applying the changes to the docs; by Peter Hartman.
Christoph Lohmann 20h@r-36.net
Making the fontconfig and freetype paths portable in config.mk.
Christoph Lohmann 20h@r-36.net
A fix for the XopenIM() errors.
Christoph Lohmann 20h@r-36.net
Increasing font cache for speeding up UTF8 demos.
Christoph Lohmann 20h@r-36.net
Removing the warning about extents.
Christoph Lohmann 20h@r-36.net
Fixing the font unloading in case of zoom.
Christoph Lohmann 20h@r-36.net
Speeding up the drawing, then all characters are known.
Christoph Lohmann 20h@r-36.net
Adding fallback support to st.
Christoph Lohmann 20h@r-36.net
Fixing a compile error.
Christoph Lohmann 20h@r-36.net
Fixing a off-by-one error in the penultimate row drawing.
Christoph Lohmann 20h@r-36.net
Fixing a precedence problem. Thanks tridactyla!
Christoph Lohmann 20h@r-36.net
Checking for the lower X11 special keys too. Thanks Benjamin R. Haskell!
Christoph Lohmann 20h@r-36.net
Adding error checks for XCreateIC and XOpenIM.
Christoph Lohmann 20h@r-36.net
Be careful about mar77i's patches.
Christoph Lohmann 20h@r-36.net
Fixing the nasty selection bug. Thanks p37sitdu@lavabit.com!
Christoph Lohmann 20h@r-36.net
Applying the patch of mar771 right.
Christoph Lohmann 20h@r-36.net
Applying the change of the Del key assingment. Thanks Martti Kühne!
Christoph Lohmann 20h@r-36.net
Add support for End key - Shift + End : Delete until end of line. - Control + End : Delete until end of screen. When the End key is pressed without any modifier is not generated the correct sequence for it (going to the end of the screen), because the size of the terminal is not known, so it is not possible write a sequence for this purpouse. --- config.def.h | 10 ++++++++-- st.info | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add support for Supr key Del : Delete character under cursor. Shift + Del : Delete the line under cursor. Ctrl + Del: Delete the full screen. --- config.def.h | 16 ++++++++++++---- st.info | 2 ++ 2 files changed, 14 insertions(+), 4 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add support for insert key Insert key stands for a key which allows enter or leaves insert mode, so let it generates the correct sequence to change between these modes: - Insert: Enter in insert mode. - Shift + Insert: Leave insert mode (replace mode). - Control + Insert: Insert a blank line. Like Shift + Insert also paste text, if a user want this feature be full functional he has to modify such shortcut. --- config.def.h | 16 ++++++++++++---- st.info | 3 +++ 2 files changed, 15 insertions(+), 4 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Fix value of ka1 terminfo capability ka1 stands for upper left of keypad, so the correct value is the one generated by Home in application keypad mode. --- st.info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add a notice in the config.def.h file how to obtain the syntax for xft/fontcache.
Christoph Lohmann 20h@r-36.net
The style inquisition was here.
Christoph Lohmann 20h@r-36.net
Add key for toogling numlock handling Keypad will generate keycodes when keypad application mode is enabled. It can cause problems with some programs like vi, which operates in such mode. This patch change by default don't generate the keycodes never, but this behaviour can be changed using the combination Alt + NumLock. --- config.def.h | 34 ++++++++++++++++++---------------- st.c | 17 +++++++++++++++-- 2 files changed, 33 insertions(+), 18 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Fixing the calculation of the base tty pixel size.
Christoph Lohmann 20h@r-36.net
Restoring the Alt + Backspace functionality. Thanks Brandon Invergo!
Christoph Lohmann 20h@r-36.net
Add application cursor sequences for Home The commit 'Fixing some key issues with mc' fix the problem where mc didn't recognize home key because the generated code and the terminfo entry were different (terminfo khome = \E[1~ but generates \033[H). Home key in ansi mode should generate the sequence CUP (\033[H) to 0,0 (home position), but it is also interesting generate a application code which identifies the key. Real vt520 only generates the ansi sequence CUP, linux console generates only the application code \033[1~, xterm generates CUP in ansi mode and \033OH in cursor application mode, rxvt only generates the application code \033[7~. This patch sets CUP in ansi mode and \033[1~ in cursor application mode, so it can be used in both modes and the application mode value is similar to near values (insert = \033[2~, Prior = \033[5~, Next = \033[6~, End = \033[4~, Supr = \033[3). --- config.def.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Fixing some key issues with mc. Thanks nsz!
Christoph Lohmann 20h@r-36.net
Getbuttoninfo is always used the same and just a helper function. Shrinking it a bit. Thanks nsz!
Christoph Lohmann 20h@r-36.net
Fix speech error in comment --- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Remove unused fields in cursor_movement --- st.c | 4 ---- 1 file changed, 4 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Removing my debug fprintf().
Christoph Lohmann 20h@r-36.net
Optimizing the key lookup to the X11 function key. It is still possible to remap other keys.
Christoph Lohmann 20h@r-36.net
Making all function keys accessible.
Christoph Lohmann 20h@r-36.net
Adding support for XK_F35.
Christoph Lohmann 20h@r-36.net
Fix Shift + Insert shortcut This patch apply the same code for shortcuts that it is used now for defined keys. So it is possible use now XK_NO_MOD and XK_ANY_MOD for defining shortcuts. --- st.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Changing the TODO to the current state.
Christoph Lohmann 20h@r-36.net
Fixing the return and keypad enter sent characters. Terminals produce \r. And some minor style changes.
Christoph Lohmann 20h@r-36.net
Import the patch of Eckehard Berns to add insert mode. Thanks!
Christoph Lohmann 20h@r-36.net
The crlf mode was reversed.
Christoph Lohmann 20h@r-36.net
Fixing Return in non-crlf mode.
Christoph Lohmann 20h@r-36.net
Use XK_ANY_MOD instead of XK_NO_MOD in key definition Usually terminal emulators don't generate any sequence for a combination they don't have registered, for example Shift + Next, but st behavior previous to the keyboard patch generates the sequence without the modifier, in this example Next. This patch uses the XK_ANY_MOD in order to get this same behaviour. --- config.def.h | 114 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 59 insertions(+), 55 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Fix XK_NO_MOD and XK_ANY_MOD behavior XK_NO_MOD match a key without modifiers and XK_ANY_MOD match a key does not matter what modifiers are pressed to. Like they are mask the best value for XK_ANY_MOD is all the bits to 1, so the and with any state will be equal to the state. This also imply that is necessary check the case for XK_NO_MOD (no modifiers at all) with some modifier in state, and the inverse (some mask different to XK_ANY_MOD or XK_NO_MOD and no modifiers in state). --- st.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Fix tab key When Shift + Tab is pressed X server send the event XK_ISO_Left_Tab with ShiftMask, so this is the entry we need in config.def.h This patch also revert the previous patch for this issue because it breaks the keyboard. --- config.def.h | 2 +- st.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Fixing the tab key, when no mask is wanted.
Christoph Lohmann 20h@r-36.net
The style inquisition was here again.
Christoph Lohmann 20h@r-36.net
Add missed key definitions This patch adds the keys for the keypad (in both modes, application mode or ansi mode) and function keys. It uses the same convention than xterm and instead of using the XK_Fxx values it generates them using F1-F12 and modifiers. For example: F1 -> ^[OP F1 + Shift = F13 -> ^[[1;2P F1 + Control = F25 -> ^[[1;5P F1 + Mod2 = F37 -> ^[[1;6P F1 + Mod1 = F49 -> ^[[1;3P F1 + Mod3 = F61 -> ^[[1;4P It is also important notice than the terminfo capability kIC (shifted insert key) only can be generated using the keypad keyboard, because the shorcut for selection paste is using the same combination. After this path the number of elements in the Key array becomes high, and maybe a sequencial search is not enough efficient now. --- TODO | 6 +--- config.def.h | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- st.info | 70 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 169 insertions(+), 9 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add control and meta combinations for arrow keys Since there isn't any terminfo capability for control and meta modifiers for arrows keys it is necessary use the same that almost terminal emulators use, because there are a lot of programs which have these codes hardcoded. This cause also that shift combinations are also changed, but in this case this is not a problem since there are terminfo capabilities for them. After this patch shift-up and shift-down continue not working in emacs with TERM=st, but they work with TERM=xterm, so it is possible some other changes are necessary in the terminfo entry. --- config.def.h | 16 ++++++++++++---- st.info | 8 ++++---- 2 files changed, 16 insertions(+), 8 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Fix arrow keys terminfo capabilities Usually the arrow keys generate the ANSI sequence which terminal will understand like a movement, so it is not necessary any dealing for them, the program can not know if the sequence is generate for a echo key or directly from the program. If you need really know if the key was pressed then you need activate the keypad mode where the keys will generate a special code for each keypad key. The terminfo capabilities kcub1, kcud1, kcuf1 and kcuu1 are used for this keypad code, not for the sequence generate in the ansi mode. --- st.info | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Remove hardcoded keys form kpress Some keys were in the Key array while others were hardcoded in kpress().This cause some problems with some keys which can generate more of one string based in the configuration of the terminal. --- config.def.h | 70 ++++++++++++++++++++++++++++++++++++++++----------------- st.c | 71 +++++++++++++++++++++++++--------------------------------- 2 files changed, 79 insertions(+), 62 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Move Shift + Insert to shortcut Shift + Insert is used like a hot key for paste the selection, so it is more logical move it to shortcut array instead of having special code for it. --- config.def.h | 1 + st.c | 13 +++---------- 2 files changed, 4 insertions(+), 10 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Fix keypad mode and cursor mode Keypad mode is used for detecting when keys in the auxiliary keypad are pressed, while cursor mode is used for detecting when a cursor is pressed, but they are different modes. St was mixing both modes and DECPAM and DECPNM modified the cursor mode, and this was incorrect. --- st.c | 5 +++-- st.info | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add SRM sequence This sequence enable/disable the local echo. --- st.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 56 insertions(+), 20 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Gc is not used anymore.
Christoph Lohmann 20h@r-36.net
Removing some xft naming cruft.
Christoph Lohmann 20h@r-36.net
Moving the alt declaration to the beginning of the function.
Christoph Lohmann 20h@r-36.net
Move unsupported sequences to ignored. These sequences will be never implemented and in this moment they are generating a lot of noise. --- st.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Ignore DECARM sequence DECARM modify the auto repeat settings in the keyboard, and since we can not modify this setting in the Xserver the best solution is only ignore it. --- st.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Fix VPR sequence VPR stands for Move cursor down a number of rows, and the code was moving the cursor up instead of moving it down. --- st.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add DECOM sequence DECOM sequence allows to the user defines a new home position. The home position is used as base for all the movement commands except HVP and VPA. It is important notice than DECSLM moves cursor to absolute position 0,0. --- st.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Save cursor position in terminal reset After terminal reset saved terminal position is reset to 0, allowing know where cursor will go in next restore cursor operation. --- st.c | 2 ++ 1 file changed, 2 insertions(+)
Roberto E. Vargas Caballero k0ga@shike2.com
Clarify some or exclusive expressions Since relational expresions are always evaluated to 0 or 1, we can use bitwise xor operator instead of using more complex boolean expressions. --- st.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Fix bug restoring cursor position Sequences like DECSC, DECRC, ESC [?1047l or ESC [?1047h save and restore cursor attributes, than taken from vt100 manual are: Save Cursor (DECSC) ESC 7 =========================== Saves the following in terminal memory. - cursor position - graphic rendition - character set shift state - state of wrap flag - state of origin mode Restore Cursor (DECRC) ESC 8 =========================== Restores the states described for (DECSC) above. If none of these characteristics were saved, the cursor moves to home position; origin mode is reset; no character attributes are assigned; and the default character set mapping is established. This implies that hide attribute of the cursor should not be saved/restored in these sequences. The best way to fix this problem is moving hide attribute into the terminal mode, instead of having it in the cursor state. --- st.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Adding scrollwheel support. Thanks Brandon Invergo!
Christoph Lohmann 20h@r-36.net
Changing the license to MIT/X.
Christoph Lohmann 20h@r-36.net
Fixing meta+return. Thanks Szabolcs Nagy!
Christoph Lohmann 20h@r-36.net
Removing the debugging for the last fix too.
Christoph Lohmann 20h@r-36.net
Fixing a resize bug, if a smaller amount than the lineheight is resized. Thanks c00kiemon5ter!
Christoph Lohmann 20h@r-36.net
Fixing bold fonts in reverse mode.
Christoph Lohmann 20h@r-36.net
Now italic and bold works.
Christoph Lohmann 20h@r-36.net
Fixing an out-of-bound bug in the selection code. Thanks Szabolczs Nagy!
Christoph Lohmann 20h@r-36.net
Fixing the italic-bold font check. Thanks nsz.
Christoph Lohmann 20h@r-36.net
Added tag 0.3 for changeset 9d54ce4daf34
Christoph Lohmann 20h@r-36.net
0.3 release.
Christoph Lohmann 20h@r-36.net
Make it possible to use the corefont font description too. It is not very useful, but easy to implement.
Christoph Lohmann 20h@r-36.net
Moving to the dwm config.h variable usage.
Christoph Lohmann 20h@r-36.net
Adding a FAQ to reference utmp(1).
Christoph Lohmann 20h@r-36.net
Cleaning up the TODO file.
Christoph Lohmann 20h@r-36.net
Removing the now senseless comment in config.def.h. Thanks to bnwe!
Christoph Lohmann 20h@r-36.net
Applying the patch of the little girl <yui@blekksprut.net> to make cjk input possible. Thanks!
Christoph Lohmann 20h@r-36.net
Applying the tab expansion patch from koga.
Christoph Lohmann 20h@r-36.net
Adding a more flexible fontstring handling, shortcuts and a zoom function.
Christoph Lohmann 20h@r-36.net
Applying the patch of Roberto Caballero to set WINDOWID and all the pwuid() variables. Thanks! xinit() and ttynew() had to be switched in their call-appearance. Otherwise xw.win is not set.
Christoph Lohmann 20h@r-36.net
Applying the patch of Rafa Garcia Gallega <rafael.garcia.gallego@gmail.com> to not emulate the vt100 behaviour of selecting all whitespaces. Thanks!
Christoph Lohmann 20h@r-36.net
Add error control to iofile write can write less bytes than we request, so it is necessary check the return value, in case of error print a message and don't continnue writing in the file. --- st.c | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Well, I was confused. Damn state exams. Instead of discussing this shit I should really learn opthalmology instead. :O
Christoph Lohmann 20h@r-36.net
If there is really someone without SHELL set, help him/her.
Christoph Lohmann 20h@r-36.net
Add DEC alignment test This sequence was used by DEC personal in to for verifying the screen adjust of terminals. It is the unique test sequence implemented by all the emulators, and I think it is because they want be conforms with vttest which uses this sequence in some tests. --- st.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Avoid initialization of vt100_0 in each call to tsetchar If vt100_0 is a automatic variable then it is initializated in each call to tsetchar, but if the variable is static it is initializated only in compile time. --- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Fix Identification sequences Do not send NUL character in the identification (use (sizeof(VT102ID) - 1), and finish the sequence once you execute it. --- st.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add DA and DECID sequences These sequences are used by the host in order to can detect which kind of terminal is connected. St will answer like a vt102 terminal with this patch. --- st.c | 9 +++++++++ 1 file changed, 9 insertions(+)
Roberto E. Vargas Caballero k0ga@shike2.com
Fixing a typo.
Christoph Lohmann 20h@r-36.net
Fixing a off-by-one error in the new border clearing code.
Christoph Lohmann 20h@r-36.net
Print control codes only in graphic mode Non handled codes must be ignored, except in graphic mode. Also STR sequences have higher priority than control codes, so they must be handled before of them. --- st.c | 160 ++++++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 87 insertions(+), 73 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add SI and SO control codes SI and SO allows change the G0 and G1 selection. This implementation is not full vt100 compatible, but it is complatible with linux virtual terminal implementation. For full vt100 compatibility we need remake a lot of stuff relate to the different charmaps. --- st.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add SUB and CAN control codes These control codes reset any escape sequence already initialised. --- st.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add documentation to control codes Add the documentation from the vt100 manual programmer: Control Octal Action Taken Character Code ------------------------------------------- NUL 000 Ignored on input (not stored in input buffer; see full duplex protocol). ENQ 005 Transmit answerback message. BEL 007 Sound bell tone from keyboard. BS 010 Move the cursor to the left one character position, unless it is at the left margin, in which case no action occurs. HT 011 Move the cursor to the next tab stop, or to the right margin if no further tab stops are present on the line. LF 012 This code causes a line feed or a new line operation. (See new line mode). VT 013 Interpreted as LF. FF 014 Interpreted as LF. CR 015 Move cursor to the left margin on the current line. SO 016 Invoke G1 character set, as designated by SCS control sequence. SI 017 Select G0 character set, as selected by ESC ( sequence. XON 021 Causes terminal to resume transmission. XOFF 023 Causes terminal to stop transmitted all codes except XOFF and XON. CAN 030 If sent during a control sequence, the sequence is immediately terminated and not executed. It also causes the error character to be displayed. SUB 032 Interpreted as CAN. ESC 033 Invokes a control sequence. DEL 177 Ignored on input (not stored in input buffer). -------------------------------------------- --- st.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Forgot to remove the xclearborders() definition from the last commit.
Christoph Lohmann 20h@r-36.net
Removing the xclearborders() hack. St now cleans up the parts of the border, if something needs to be drawn close to it.
Christoph Lohmann 20h@r-36.net
The style inquisition was here. Yes, making it a unified style. The last infidels will be squashed too!
Christoph Lohmann 20h@r-36.net
Adding the patch of David Dufberg Töttrup to implement WM_DELETE_WINDOW. Thank you!
Christoph Lohmann 20h@r-36.net
Fixing the brightening on bold. For the 256 colors and greyscale I assumed a reasonable solution.
Christoph Lohmann 20h@r-36.net
Turning on antialias by default really makes it more unreadable. Maybe if once the majority has bigger screens, this can be turned on by default again. Thanks pancake, for the hint.
Christoph Lohmann 20h@r-36.net
When the drawing behaviour was changed underline was not corrected. Thanks to Peter A. Shevtsov!
Christoph Lohmann 20h@r-36.net
This adds the fontcache dependency to try something out. Additionally the invert mode now works as expected. In the config.def.h autohint is set to false, so the fonts are drawn correctly, without any overlapping.
Christoph Lohmann 20h@r-36.net
Thanks to c00kiemon5ter. Not changing bold to bright colors seems to be the right choice.
Christoph Lohmann 20h@r-36.net
Removing the now obsolete definitions from the config.def.h file.
Christoph Lohmann 20h@r-36.net
This changes -f to be the parameter for the font. Now -f is -o. The parameters were reordered according to the alphabet too.
Christoph Lohmann 20h@r-36.net
Remove the cruft of the user to have to define the different font styles.
Christoph Lohmann 20h@r-36.net
We need all the colors to be available, so die() on some not available. This is a new opportunity to see if X11 somewhen handled colors in a strange way.
Christoph Lohmann 20h@r-36.net
All xcolors are not Xft colors and the clearing of the borders has been optimized. There is a speedup when resizing windows.
Christoph Lohmann 20h@r-36.net
Vt escape sequences allow escape sequences in escape sequences and escape sequences, so we have to support escape sequences in escape sequences that escape sequences in escape sequences – setting a title won't notify you anymore.
Christoph Lohmann 20h@r-36.net
Allow control characters inside escape sequences Taken from vt100 manual programmer: Control characters (codes \0 to \37 inclusive) are specifically excluded from the control sequence syntax, but may be embedded within a control sequence. Embedded control characters are executed as soon as they are encountered by the VT100. The processing of the control sequence then continues with the next character received. --- st.c | 68 +++++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 34 insertions(+), 34 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Ignore all control characters not handled Taken from vt100 programmer manual: Control characters have values of \000 - \037, and \177. The control characters recognized by the VT100 are shown in Table 3-10. All other control codes cause no action to be taken. We have to take attention when we are using alternate charset, because in this cases they are not used as control characters. --- st.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Switching to Liberation Mono as default solely because of line drawing. A next patch to fix the font symbols in all fonts should make it easier to choose a better font.
Christoph Lohmann 20h@r-36.net
Implementing line drawing right.
Christoph Lohmann 20h@r-36.net
A reset should reset the line drawing too.
Christoph Lohmann 20h@r-36.net
Enabling enacs and adding compatibility to xterm and urxvt for alternative charsets.
Christoph Lohmann 20h@r-36.net
Fix bug in tputc writing to io file If -f options is enabled then tputc() writes all the data to a file. Actual code assumes that all the strings in 'c' parameters have always 1 byte length, but this is not always true, because due to utf-8 encoding some characters can have a diferent length. So it is necessary pass string length to tputc in order it can call to write() correctly. --- st.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Changing the default font to DejaVu Sans Mono, which is more appealing and activating antialiasing.
Christoph Lohmann 20h@r-36.net
The xinit() call needs to be behind all the tty init, otherwise all the allocated structures are wrong. The xclear() is now done on purpose. Please keep X11 calls out of the way of pure tty-related calls.
Christoph Lohmann 20h@r-36.net
Adding a TODO for xft fallback.
Christoph Lohmann 20h@r-36.net
Add some documentetion to tsetmode The names of the terminal modes supported by vt102 are (taken from the VT220 programmer reference manual): Table 4-7 ANSI-Standardized Modes Name Mnemonic Parameter (Ps) Error (ignored) - 0 (3/0) Keyboard action KAM 2 (3/2) Insert/replace IRM 4 (3/4) Send/receive SRM 12 (3/1 3/2) Line feed/new line LNM 20 (3/2 3/0) Table 4-8 ANSI-Compatible DEC Private Modes Name Mnemonic Parameter (Ps) Error (ignored) - 0 (3/0) Cursor key DECCKM 1 (3/1) ANSI/VT52 DECANM 2 (3/2) Column DECCOLM 3 (3/3) Scroll DECSCLM 4 (3/4) Screen DECSCNM 5 (3/5) Origin DECOM 6 (3/6) Auto wrap DECAWM 7 (3/7) Auto repeat DECARM 8 (3/8) Printer form feed DECPFF 18 (3/1 3/8) Printer extent DECPEX 19 (3/1 3/9) Text cursor enable DECTCEM 25 (3/2 3/5) National replacement character sets DECNRCM 42 (3/4 3/2) This patch adds a comment for each one of these sequences. --- st.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Fix LNM sequence LNM sequence is a standard ANSI mode, not a DEC private mode. --- st.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add KAM sequence This sequence lock/unlock the keyboard ignoring all the key pressing events from X server. --- st.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Remove unused parameters in ttyresize --- st.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Clear X window in tsetreset() tsetreset() is called when it is necessary a full initialization of the terminal, so it also should clean the full X window and not only the terminal content. It is necessary change the order of the initialization in main(), and put xinit before of tnew(), because tnew() calls to tsetreset(), and this can cause a call to xreset() with incorrect values. --- st.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Merging xft and current st heads.
Christoph Lohmann 20h@r-36.net
Initial Xft support for st. More to follow.
Christoph Lohmann 20h@r-36.net
config.def.h: typo in comment.
Aurélien Aptel aurelien.aptel@gmail.com
LEGACY: typo.
Aurélien Aptel aurelien.aptel@gmail.com
Redrawing is fixed.
Christoph Lohmann 20h@r-36.net
Fixing the redrawing patch of k0ga, so it's using xclear() in redraw() too.
Christoph Lohmann 20h@r-36.net
Clean windows display after resizing Some times the size after a resizing is not an exact multiply of a number of characters, so redrawn the screen using the lines and columns of the neww size can cause that some old graphics keep in the screen. Solution is clean all the windows with the background color. --- st.c | 3 +++ 1 file changed, 3 insertions(+)
Roberto E. Vargas Caballero k0ga@shike2.com
Copy non set positions as spaces st selection don't insert in the selection position whose value is not set. This is correct for the positions in the end of the line, but cause some problems in the beginning. For example echo -e 'a\tb' will print in the screen: a b but after selecting and copying in some place you get: ab because positions from 1 to 7 don't have any value. This patch deals all positions without value as blank (even at the end of the line). --- st.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add newline in error messages --- st.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add xcalloc wrapper malloc and realloc are called through xmalloc and xrealloc, so calloc should be called through xcalloc. --- st.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Applying a shortening proposal for the run loop of k0ga.
Christoph Lohmann 20h@r-36.net
Remove call to draw in resize In previous commits draw was removed from all the X events, but I forgot do it in resize. --- st.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Adding some more fields to the manpage, like authors, license etc.
Christoph Lohmann 20h@r-36.net
Remove some solved issues and add some new.
Christoph Lohmann 20h@r-36.net
Preliminary solution to the stuttering problem.
Christoph Lohmann 20h@r-36.net
Fix selection bug After the commit named "Remove timeout in the main loop", selection is not working in the proper way. After selecting something, press mouse button in a line outside of selection causes an incorrect highlight. This patch fix the problem forcing a draw after the press event, but this is only a fast hack. Real solution means rewriting selection code. --- st.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Render only once in each main loop iteration draw() runs over all lines of the screen and renders only the dirty lines, this avoids render lines which are not modified since last draw() call. In this moment the main loop is something like: - Wait something to read from file descriptors - Read from pseudo tty - Call draw() for rending - Read X events This cause the problem that all the X events that have to update the screen have to call draw() (because draw() is called before of X events handling), so you can have multiples renderings in only one iteration, that will waste a lot of resources. This patch change the main loop to: - Wait something to read from file descriptors - Read from pseudo tty - Read X events - Call draw() for rending So X events don't have to worry about rendering, because draw() is called after them. The only place where draw is called outside of the main loop is in redraw(), but it is necessary for getting a good tput flash. --- st.c | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Remove timeout in the main loop The main loop waits until there is some data to read in file descriptors of the X server or the pseudo tty. But it uses a timeout in select(), which causes that st awake each 20 ms, even it doesn't have something to do. This patch removes this problem removing the timeout, which is not needed. --- TODO | 1 - st.c | 27 +++------------------------ 2 files changed, 3 insertions(+), 25 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Call XSync in redraw It is necessary call to XSync if you want a good tput flash, because in other way you can not be sure that white screen will be shown. --- st.c | 1 + 1 file changed, 1 insertion(+)
Roberto E. Vargas Caballero k0ga@shike2.com
Call XdbeQueryExtension before of calling any Xdbe function XdbeQueryExtension() tells to the caller if the Xdbe extension is present in the X server, so it should be called for sanity. But like is said in XdbeQueryExtension(3): No other Xdbe functions may be called before this function. If a client violates this rule, the effects of all subsequent Xdbe calls that it makes are undefined. it is mandatory call this function. --- st.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Implementing italic-bold. This will require an increase of the avgWdth.
Christoph Lohmann 20h@r-36.net
Ignore NUL character as a padding character. Telnet may use this. Patch of Roberto Vargas.
Christoph Lohmann 20h@r-36.net
Importing the patch of Roberto Vargas to inherit signal handlers.
Christoph Lohmann 20h@r-36.net
Reset window title on terminal reset too.
Christoph Lohmann 20h@r-36.net
Adding a statemant on legacy support.
Christoph Lohmann 20h@r-36.net
Adding another bold off sequence.
Christoph Lohmann 20h@r-36.net
Remove buffering to fileio instead of calling fflush By default text files are line buffered, and this means that -f option will not write the line until a \n is printed. This is not very useful for debugging, so a call to fflush was added. This patch substitute this call (which will be done by each character painted) by the full remove of the buffering in the file. --- st.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add xmalloc and xrealloc wrappers If malloc or realloc fail they return NULL. Theorically this condition should be tested in the code, but it's a strange condition today (basically if this is hapenning thenyou have a big problem), and even Linux never returns NULL in the default configuration (only if the process don't have room in the space address, something a bit impossible in the case of st). But stis enough small for being executed in low resources computers where this can be a real problem. So the easy way is creating a wrappers function for them and call to die in case of error. --- st.c | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Make nyancat(1) work. Important release feature!
Christoph Lohmann 20h@r-36.net
Add preliminary blink stubs. Real implementation is still missing.
Christoph Lohmann 20h@r-36.net
Add another obscure way to set a window title.
Christoph Lohmann 20h@r-36.net
Fixing the too small window in non-tiling window managers.
Christoph Lohmann 20h@r-36.net
Making the selection work again.
Christoph Lohmann 20h@r-36.net
Allow simpler stdout -f handling.
Christoph Lohmann 20h@r-36.net
Adding instantenous debug output and fixing italic with a reset.
Christoph Lohmann 20h@r-36.net
Adding the removal of the timeouts to the TODO.
Christoph Lohmann 20h@r-36.net
Removing masks for unhandled enter and leaving events.
Christoph Lohmann 20h@r-36.net
If the selection is cleared, draw() and do it on button press too.
Christoph Lohmann 20h@r-36.net
Unhighlight selection when selection is owner by other window st marks the active selection using reverse colors in the box selection, but once that another window becomes owner of the selection, it is very confusing that st keeps highlight the old selection. Usually terminal emulators remove the highlight when it is not valid anymore. X sends a SelectionClear event in this situation, so we only have to add a callback which unhighlight the selectin box. --- st.c | 9 +++++++++ 1 file changed, 9 insertions(+)
Roberto E. Vargas Caballero k0ga@shike2.com
Forcing the parameter limit to xcopy() and selpaste(). Thanks to Rob Pilling.
Christoph Lohmann 20h@r-36.net
Removing unneeded arguments to copy(). Thanks to Andrew Hills.
Christoph Lohmann 20h@r-36.net
Implement italic font support.
Christoph Lohmann 20h@r-36.net
Add to TODO to make function keys work.
Christoph Lohmann 20h@r-36.net
Enable keypad set and unset commands.
Christoph Lohmann 20h@r-36.net
Disable BCE again.
Christoph Lohmann 20h@r-36.net
Removing the resize issue from the TODO file.
Christoph Lohmann 20h@r-36.net
Fixing the resizing behaviour.
Christoph Lohmann 20h@r-36.net
Forgot one line. It's late.
Christoph Lohmann 20h@r-36.net
Cleaning up the fixed window size and the resizing of clients.
Christoph Lohmann 20h@r-36.net
Another thing for TODO – resize.
Christoph Lohmann 20h@r-36.net
Updating the TODO and enabling BCE.
Christoph Lohmann 20h@r-36.net
CUP == HVP; CHA == HPA;
Christoph Lohmann 20h@r-36.net
Unifying the old style.
Christoph Lohmann 20h@r-36.net
Check alternative screen before drawing box selection Some programs use the alternative screen (vi, less, ...), whose content is different of the main screen. If you select text in one of the screen, you don't wait the box selection is painted in the other screen, so it is necessary check if the selection was done in the same screen we are going to paint. Before to this commit, you could do something like: $ LESS="" ls | less (select some code) q and selection box remains drawing in the main screen, but the content of selection keeps text of the alternate screen. --- st.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add newline to stderr message --- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Fixing the border pixel when there is a negative position.
Christoph Lohmann 20h@r-36.net
Add -g geometry to st and the manpage.
Christoph Lohmann 20h@r-36.net
Fixing a type in in2 in the st.info.
Christoph Lohmann 20h@r-36.net
Force redisplay of all lines in DECSCNM When it is called DECSCNM all lines become dirty, because it is necessary redraw all lines for getting the new colors. It is easy see the problem running 'echo ^[[?5h'. In order to get a correct flash when running tput flash is necessary wait after DECSCNM, until the changes are displayed, because in other case the switch between reverse on/reverse off will be too much fast and nothing will happen. --- st.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add write I/O to file This is a theorical feature listed in http://st.suckless.org/goals. All the input/output of the terminal will be written to a file, which can be very useful for debugging, and also allow interconnect st to other process through named pipes. --- st.1 | 6 ++++++ st.c | 14 +++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Patch from Roberto Vargas. »Add initialization strings in terminfo« Taken from the description: When tput init is executed the list of task performed are (taken from terminfo(5)): run the program iprog output is1 is2 set the margins using mgc, smgl and smgr set tabs using tbc and hts print the file if and finally output is3. When reset is executed, a more stronger initialization process is performed, so the terminal can return from an unknown state. rs1, rs2 and rs3 are used in this case instead of using is1, is2 and is3. This patch makes is2 = rs2, resets insert mode and set normal keypad mode. For rs1 it performs a full initilization using ^[c.
Christoph Lohmann 20h@r-36.net
Add standout mode.
Christoph Lohmann 20h@r-36.net
Cleaning up lonely tabs.
Christoph Lohmann 20h@r-36.net
Make it more obvious where the wrong attribute is used.
Christoph Lohmann 20h@r-36.net
Enable multiple arguments in SM and RM SM and RM can receive multiple parameters, but the code only was accepting only one. This patch join the code of set and reset modes (SM and RM) in a common function and uses a loop which deals with all the arguments of the sequence. This patch improves xterm and vt100 compability. --- st.c | 180 ++++++++++++++++++++++++++++-------------------------------------- 1 file changed, 76 insertions(+), 104 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add vpa terminfo capability --- st.info | 2 ++ 1 file changed, 2 insertions(+)
Roberto E. Vargas Caballero k0ga@shike2.com
Silencing the compiler but keeping strparse. This will really be needed when there is a full 256 color support.
Christoph Lohmann 20h@r-36.net
Applying the CBT patch of Roberto Vargas. Thanks.
Christoph Lohmann 20h@r-36.net
Never trust terminfo fata morganas. And adding other xterm compatibility.
Christoph Lohmann 20h@r-36.net
Add OSC, DSC, PM, APC and settitle.
Christoph Lohmann 20h@r-36.net
Adding setb and setf and a comment about terminfo installation.
Christoph Lohmann 20h@r-36.net
Add CHT sequence This sequence performs "Cursor Forward Tabulation <n> tab stops", which although is not present in vt100 or vt102, xterm accepts it. --- st.c | 5 +++++ 1 file changed, 5 insertions(+)
Roberto E. Vargas Caballero k0ga@shike2.com
Applying the patches of k0ga and changing the LICENSE file in the appropriate way.
Christoph Lohmann 20h@r-36.net
Add TBC sequence This sequence clears tab stops in the terminal. If the argument is not present or is zero, then removes the tab stop of the current horizontal position. If the argument is 3 then removes all the tab stops of the terminal. It was necessary modify the terminfo entry tbc, because it has \E[2g instead of the correct \E[3g. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com> --- st.c | 12 ++++++++++++ st.info | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add HTS sequence This sequence adds a new tab stop in the current horizontal position. This means that tputtab must be look for the next tab stop in the tabs array instead of using a hard coded value offset. Also, CHT sequence XXX message is removed because it is not a vt10x sequence (as far as I know it is a vt50x sequence), and it is not implemented by linux virtual terminal neither by xterm. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com> --- st.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
Add tabs field into Term struct Tabs stop are simulated in st using a fixed size of 8, always, without be worried about sequences changing the tab stops. A user can put a tab stop in each horizontal position of the screen, so we need at least one flag for each column of the screen. In the same way as dirty flags is used for the rows, it is used a bool dinamic array. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com> --- st.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
apply post-XDBE patch BORDER fix
Brandon Invergo brandon@invergo.net
Implement Xdbe-based double-buffering
Brandon Invergo brandon@invergo.net
update TODO.
Aurélien Aptel aurelien.aptel@gmail.com
cleanup. refactored dirt-related function.
Aurélien Aptel aurelien.aptel@gmail.com
use SHELL as default shell.
Aurélien Aptel aurelien.aptel@gmail.com
revert to "tip" in VERSION.
Aurélien Aptel aurelien.aptel@gmail.com
Added tag 0.2.1 for changeset 108926a0fe61
Aurélien Aptel aurelien.aptel@gmail.com
bump version.
Aurélien Aptel aurelien.aptel@gmail.com
replace fwrite by printf.
Aurélien Aptel aurelien.aptel@gmail.com
rewrite csidump().
Aurélien Aptel aurelien.aptel@gmail.com
clean and name enum definitions.
Aurélien Aptel aurelien.aptel@gmail.com
fix default color overwriten bug.
Aurélien Aptel aurelien.aptel@gmail.com
show dark cursor when unfocused.
Aurélien Aptel aurelien.aptel@gmail.com
document possible configuration.
Aurélien Aptel aurelien.aptel@gmail.com
handle dim/bright colors.
Aurélien Aptel aurelien.aptel@gmail.com
merge
Aurélien Aptel aurelien.aptel@gmail.com
reduce size of each glyph for faster copy.
Aurélien Aptel aurelien.aptel@gmail.com
Added tag 0.2 for changeset 3c2f9f2ab5e4
Aurélien Aptel aurelien.aptel@gmail.com
cosmetic, whitespace, etc.
Aurélien Aptel aurelien.aptel@gmail.com
fix PRINT/DRAW _TIMEOUT and fix redrawing bug.
Aurélien Aptel aurelien.aptel@gmail.com
copy dirty lines to screen, add select() timeout & min time between draw() calls. * add a timeout value (SELECT_TIMEOUT) of 20ms in the select() call * wait at least 20ms (DRAW_TIMEOUT) between draw() calls * only copy dirty lines from the buffer to the screen what draw() does: * clears dirty lines in the buffer * draws the longest same-attributes string of each dirty line to the buffer with multiple xdraws() call * copies the current dirty line from buffer to the screen with a single xcopy() call this changeset makes st run ~10x faster.
Aurélien Aptel aurelien.aptel@gmail.com
fix segfault in selection. (thx Martti Kühne)
Aurélien Aptel aurelien.aptel@gmail.com
merge.
Aurélien Aptel aurelien.aptel@gmail.com
fix selection. (thx Tarmo Heiskanen)
Aurélien Aptel aurelien.aptel@gmail.com
add dirty flag for lines
Aurélien Aptel aurelien.aptel@gmail.com
no palette limit (thx Nick)
Aurélien Aptel aurelien.aptel@gmail.com
simplify version format.
Aurélien Aptel aurelien.aptel@gmail.com
selection is removed or scrolled properly. (thx Rafa Garcia Gallego)
Aurélien Aptel aurelien.aptel@gmail.com
working on old repo, merging recent changesets.
Aurélien Aptel aurelien.aptel@gmail.com
move xembedatom in XWindow struct, add link to xembed specs.
Aurélien Aptel aurelien.aptel@gmail.com
tweak focus to support XEMBED client message and remove focus on EnterNotify. (thx Adrian)
Aurélien Aptel aurelien.aptel@gmail.com
remove dup of default window size.
Aurélien Aptel aurelien.aptel@gmail.com
fix focus state when embed in another window.
Aurélien Aptel aurelien.aptel@gmail.com
fix segfault with mouse selection. (thx anonymous)
Aurélien Aptel aurelien.aptel@gmail.com
add -w option to embed st. (thx nodus cursorius)
Aurélien Aptel aurelien.aptel@gmail.com
applied parts of "anonymous" cleanup patch.
Aurélien Aptel aurelien.aptel@gmail.com
add altscreen escseq alias & caps to terminfo entry. (thx Bert Münnich)
Aurélien Aptel aurelien.aptel@gmail.com
disable mouse highlight when mouse report enabled. (thx Bert Münnich)
Aurélien Aptel aurelien.aptel@gmail.com
reverse video mode. (thx Bert Münnich)
Aurélien Aptel aurelien.aptel@gmail.com
add status bar (window title) to terminfo. (thx Rafa Gallego)
Aurélien Aptel aurelien.aptel@gmail.com
set title before mapping window (thx Kamil Cholewiński).
Aurélien Aptel aurelien.aptel@gmail.com
applied parts of Connor Lane Smith's cleanup patch.
Aurélien Aptel aurelien.aptel@gmail.com
macro cleanup.
Aurélien Aptel aurelien.aptel@gmail.com
add mouse report escape to terminfo entry.
Aurélien Aptel aurelien.aptel@gmail.com
support for x11 xterm mouse reporting
Aurélien Aptel aurelien.aptel@gmail.com
whitespace.
Aurélien Aptel aurelien.aptel@gmail.com
cleanup.
Aurélien Aptel aurelien.aptel@gmail.com
update TODO
Aurélien Aptel aurelien.aptel@gmail.com
selection clicks, shift+arrow keys, fast(er) redraw, key mask in config.h (thx Magnus Leuthner)
Aurélien Aptel aurelien.aptel@gmail.com
update README.
Aurélien Aptel aurelien.aptel@gmail.com
quick bug-fixing 0.1.1 release.
Aurélien Aptel aurelien.aptel@gmail.com
update VERSION.
Aurélien Aptel aurelien.aptel@gmail.com
take BORDER into account for selection. (thx Petr Sabata)
Aurélien Aptel aurelien.aptel@gmail.com
fix utf8 clipboard. (thx Petr Sabata)
Aurélien Aptel aurelien.aptel@gmail.com
Added tag 0.1 for changeset cbc18c988236
Aurélien Aptel aurelien.aptel@gmail.com
add support for utf8 clipboard. fix usage message.
Aurélien Aptel aurelien.aptel@gmail.com
do not add newline to selection text if next line not selected (Nick)
pancake@nopcode.org unknown
remove debugging printf
pancake@nopcode.org unknown
apply Nick's patch to fix some error printf to use stderr
pancake@nopcode.org unknown
fix insert key, terminfo and changed TERM back to st. (thx Ondrej Martinek)
Aurélien Aptel aurelien.aptel@gmail.com
change X cursor to "I".
Aurélien Aptel aurelien.aptel@gmail.com
update terminfo entry.
Aurélien Aptel aurelien.aptel@gmail.com
add new line glitch to terminfo entry.
Aurélien Aptel aurelien.aptel@gmail.com
change -e behaviour and update man page.
Aurélien Aptel aurelien.aptel@gmail.com
-e flag handles arguments.
Aurélien Aptel aurelien.aptel@gmail.com
use memmove() instead of memcpy() in ttyread().
Aurélien Aptel aurelien.aptel@gmail.com
fix and clean ttyread(). buf wasn't static.
Aurélien Aptel aurelien.aptel@gmail.com
merge.
Aurélien Aptel aurelien.aptel@gmail.com
s/xw.dis/xw.dpy/
Aurélien Aptel aurelien.aptel@gmail.com
cleanup & bugfix in xdraws().
Aurélien Aptel aurelien.aptel@gmail.com
clean comment regarding redrawing in bmotion().
Aurélien Aptel aurelien.aptel@gmail.com
Add -c option to override the default window class
Gregor Best gbe@ring0.de
some code cleaning.
Aurélien Aptel aurelien.aptel@gmail.com
utf8 support! print text in delicious unicode greatness! all hail to the glorious Damian Okrasa for the patch! TERM set back to xterm. changed default fonts. Note: drawing is now (even) slower.
Aurélien Aptel aurelien.aptel@gmail.com
selection code cleanup.
Aurélien Aptel aurelien.aptel@gmail.com
fixed ED.
Aurélien Aptel aurelien.aptel@gmail.com
redraw if we scroll on resize
Devin J. Pohly djpohly@djpohly.com
get rid of artifacts in border on resize down
Devin J. Pohly djpohly@djpohly.com
copy old pixmap to new on resize
Devin J. Pohly djpohly@djpohly.com
move code into new xresize func, add early exit to resize
Devin J. Pohly djpohly@djpohly.com
\v and \f are have the same behaviour of \n.
Aurélien Aptel aurelien.aptel@gmail.com
added LNM mode; re-organized kpress() to handle it.
Aurélien Aptel aurelien.aptel@gmail.com
redraw optimization.
Aurélien Aptel aurelien.aptel@gmail.com
fixed newline bug.
Aurélien Aptel aurelien.aptel@gmail.com
replaced memset by loops in tresize(); turns out it's faster.
Aurélien Aptel aurelien.aptel@gmail.com
remove useless draw().
Aurélien Aptel aurelien.aptel@gmail.com
applied xclipboard patch. thx David Isaac Wolinsky.
Aurélien Aptel aurelien.aptel@gmail.com
clean button selection code.
Aurélien Aptel aurelien.aptel@gmail.com
compose key patch. thx federico luna.
Aurélien Aptel aurelien.aptel@gmail.com
s/hasfocus/focus/ for consistency.
Aurélien Aptel aurelien.aptel@gmail.com
don't draw if the window is not visible.
Aurélien Aptel aurelien.aptel@gmail.com
use xclear() in draw().
Aurélien Aptel aurelien.aptel@gmail.com
use XCreateWindow(), set gravity bit.
Aurélien Aptel aurelien.aptel@gmail.com
cleaning st.info. added comment in st.c for DECSCNM.
Aurélien Aptel aurelien.aptel@gmail.com
cleaning st.info. fixed cvvis.
Aurélien Aptel aurelien.aptel@gmail.com
set terminal colors to xterm default ones.
Aurélien Aptel aurelien.aptel@gmail.com
removed gfx chars not present in xterm acsc.
Aurélien Aptel aurelien.aptel@gmail.com
fixed start/end sequence of gfx.
Aurélien Aptel aurelien.aptel@gmail.com
undefined gfx doesn't draw \0.
Aurélien Aptel aurelien.aptel@gmail.com
fixed makefile.
Aurélien Aptel aurelien.aptel@gmail.com
added manpage.
Aurélien Aptel aurelien.aptel@gmail.com
resize from the top.
Aurélien Aptel aurelien.aptel@gmail.com
added -e and -t option.
Aurélien Aptel aurelien.aptel@gmail.com
factored code and fixed behaviour of tnewline().
Aurélien Aptel aurelien.aptel@gmail.com
updated TODO.
Aurélien Aptel aurelien.aptel@gmail.com
started to go through st.info and fix things.
Aurélien Aptel aurelien.aptel@gmail.com
capabilities sorted by capname in st.info. copy acsc from xterm.
Aurélien Aptel aurelien.aptel@gmail.com
removed debug code.
Aurélien Aptel aurelien.aptel@gmail.com
fixed IL and DL.
Aurélien Aptel aurelien.aptel@gmail.com
factor and cleanup code.
Aurélien Aptel aurelien.aptel@gmail.com
added correct line drawing characters for default font.
Aurélien Aptel aurelien.aptel@gmail.com
use struct instead of array.
Aurélien Aptel aurelien.aptel@gmail.com
cleanup.
Aurélien Aptel aurelien.aptel@gmail.com
fix segfault when selecting big buffers shift+insert paste clipboard honor CFLAGS and LDFLAGS in config.mk
pancake@nopcode.org unknown
fix build.
Aurélien Aptel aurelien.aptel@gmail.com
add selinit() and renamed clipboard_* to sel*.
Aurélien Aptel aurelien.aptel@gmail.com
move event configuration in xinit().
Aurélien Aptel aurelien.aptel@gmail.com
use one global struct instead of many vars for selection. Cleanup.
Aurélien Aptel aurelien.aptel@gmail.com
use GLYPH_SET to test if a char is set; cleanup.
Aurélien Aptel aurelien.aptel@gmail.com
fix crash for small windows use unconditional infinite loops
pancake@nopcode.org unknown
toggle ATTR_REVERSE on selected text, factored some code and fixed Makefile.
Aurélien Aptel aurelien.aptel@gmail.com
fix build use config.def.h mechanism add SHELL in config.h
pancake pancake@nopcode.org
initial implementation of selection and clipboard
pancake pancake@nopcode.org
fix segfault
pancake@nopcode.org unknown
added support for alternate screen.
Aurélien Aptel aurelien.aptel@gmail.com
cursor is hid when unfocused.
Aurélien Aptel aurelien.aptel@gmail.com
use predefined OS macro instead of uname.
Aurélien Aptel aurelien.aptel@gmail.com
st should compile on NetBSD.
Aurélien Aptel aurelien.aptel@gmail.com
removed pty.h. minimal system guessing added in config.mk.
Aurélien Aptel aurelien.aptel@gmail.com
removed (visual) bell. '\a' sets the urgency flag if st is unfocused.
Aurélien Aptel aurelien.aptel@gmail.com
removed useless cursor init. and renamed xcursor() to xdrawcursor().
Aurélien Aptel aurelien.aptel@gmail.com
added support for the "magic margin", changed c.hide to c.state, changed xcursor() to use term instead of a parameter and fixed the cursor position after setting a scrolling region.
Aurélien Aptel aurelien.aptel@gmail.com
removed old VT52 escapes, fixed VT100 IND.
Aurélien Aptel aurelien.aptel@gmail.com
fixed optimized drawing routine and factored some code.
Aurélien Aptel aurelien.aptel@gmail.com
fixed pixmap buffer drawing.
Aurélien Aptel aurelien.aptel@gmail.com
added a XFlush() in xbell().
Aurélien Aptel aurelien.aptel@gmail.com
moved term.hidec in term.c for consistency, put back delay in xbell() along with duration in config.h, factored some code in tnew()/treset() and cleaned some code.
Aurélien Aptel aurelien.aptel@gmail.com
merged tscroll() with tscrollup().
Aurélien Aptel aurelien.aptel@gmail.com
st now runs on Linux, OpenBSD and FreeBSD.
Aurélien Aptel aurelien.aptel@gmail.com
removed XINERAMA from config.mk and fixed a segfault when st is started without a display. (thx Hiltjo Posthuma)
Aurélien Aptel aurelien.aptel@gmail.com
fixed potential bug in IS_SET().
Aurélien Aptel aurelien.aptel@gmail.com
merged tcursorwrap() with tnewline(), added few comments and updated copyright.
Aurélien Aptel aurelien.aptel@gmail.com
cleaned some spaces.
Aurélien Aptel aurelien.aptel@gmail.com
added macro to test flags, removed tmovecursor().
Aurélien Aptel aurelien.aptel@gmail.com
faster resizing.
Aurélien Aptel aurelien.aptel@gmail.com
close master/slave pty in the shell process.
Aurélien Aptel aurelien.aptel@gmail.com
clean \t.
Aurélien Aptel aurelien.aptel@gmail.com
update function prototypes.
Aurélien Aptel aurelien.aptel@gmail.com
fix \b and clean \t.
Aurélien Aptel aurelien.aptel@gmail.com
added F1-12 key, fixed DCH and ICH.
Aurélien Aptel aurelien.aptel@gmail.com
fixed backspace problem, updated terminfo entry and moved TNAME in config.h.
Aurélien Aptel aurelien.aptel@gmail.com
renamed a function.
Aurélien Aptel aurelien.aptel@gmail.com
applied Devin J Pohly's st color info patches, thanks Devin!
Anselm R Garbe anselm@garbe.us
fix gcc warnings
pancake@nopcode.org unknown
fixed background color bug (thx Devin J. Pohly).
Aurélien Aptel aurelien.aptel@gmail.com
added PBaseSize hint and set default title to "st".
Aurélien Aptel aurelien.aptel@gmail.com
rearranged code, resize fixed.
Aurélien Aptel aurelien.aptel@gmail.com
little clean up.
Aurélien Aptel aurelien.aptel@gmail.com
use SHELL environment variable (thx Thomas Adam)
Aurélien Aptel aurelien.aptel@gmail.com
double-buffering added using pixmap (finally). results in a lot of simplification : - no more dirty flags (perf are good enough). - no more ugly gfx call in emulation functions. LINESPACE removed from config.h. BORDER is now handled correctly.
Aurélien Aptel aurelien.aptel@gmail.com
bold attribute is back. visibility of the cursor is not saved/loaded anymore. scrolling up/down is fixed. added RI and RIS sequences. fixed cursor drawing bug.
Aurélien Aptel aurelien.aptel@gmail.com
added VT100 NEL.
Aurélien Aptel aurelien.aptel@gmail.com
added VT100 RI.
Aurélien Aptel aurelien.aptel@gmail.com
added VT100 save&load cursor support.
Aurélien Aptel aurelien.aptel@gmail.com
ECH handled correctly.
Aurélien Aptel aurelien.aptel@gmail.com
more escapes & more compability: cursor keys are handled in kpress according to the Application Mode (DECPAM). define & enum were renamed. tcursor() is now tmovecursor() which is more correct. tcpos() is now tcursor(), as DECSC is also supposed to save attributes. capnames are indicated whenever possible. Currently: alsamixer looks fine, totally usable. ncmpc is almost ok. emacs looks like shit.
Aurélien Aptel aurelien.aptel@gmail.com
graphic charset and a few more escapes.
Aurélien Aptel aurelien.aptel@gmail.com
TERM set to xterm by default (which broke a lot of stuff), better escape handling (title), and a little clean up.
Aurélien Aptel aurelien.aptel@gmail.com
drawing is faster but the bold attr is not supported anymore.
Aurélien Aptel aurelien.aptel@gmail.com
Fixed possible segfault by reverting to the key struct (again).
Aurélien Aptel aurelien.aptel@gmail.com
only compile tdump if DEBUG flag is set
Anselm R Garbe garbeam@gmail.com
we definately need pixmaps for the drawing, currently drawing into the window is painfully slow! much more slower than drawing into a pixmap and mapping that when finished -- several optimisations
Anselm R Garbe garbeam@gmail.com
reverted back to the old Key struct.
Aurélien Aptel aurelien.aptel@gmail.com
updated "key" to a lookup table.
Aurélien Aptel aurelien.aptel@gmail.com
removed old unused cursor() proto.
Aurélien Aptel aurelien.aptel@gmail.com
fixed the scrolling bug and cleaned some stuff.
Aurélien Aptel aurelien.aptel@gmail.com
dump escseq if not handled.
Aurélien Aptel aurelien.aptel@gmail.com
clean up.
Aurélien Aptel aurelien.aptel@gmail.com
added/removed files, updated Makefile.
Aurélien Aptel aurelien.aptel@gmail.com
made kpress() more flexible, removed st.h, added config.h.
Aurélien Aptel aurelien.aptel@gmail.com
updated TODO.
Aurélien Aptel aurelien.aptel@gmail.com
added sigchld handler, cleaned error checking.
Aurélien Aptel aurelien.aptel@gmail.com
cleaned up (removed space indentation). select/event bug fixed.
Aurélien Aptel aurelien.aptel@gmail.com
fixed a memory leak & segfault in tresize.
Aurélien Aptel aurelien.aptel@gmail.com
updated TODO.
Aurélien Aptel aurelien.aptel@gmail.com
tab moves the cursor instead of inserting spaces.
Aurélien Aptel aurelien.aptel@gmail.com
handle tabulation (still not perfect)
Aurélien Aptel aurelien.aptel@gmail.com
removed truecolor stuff
Aurélien Aptel aurelien.aptel@gmail.com
removed the truecolor stuff
Aurélien Aptel aurelien.aptel@gmail.com
same thing, really fixed this time.
Aurélien Aptel aurelien.aptel@gmail.com
added some error checking in xinit (fixed the segfault caused by a missing font)
Aurélien Aptel aurelien.aptel@gmail.com
Removed unused variable and cleaned some comment.
Aurélien Aptel aurelien.aptel@gmail.com
backport of local changes
Anselm R Garbe garbeam@gmail.com
add accidentally omitted word
Matthias-Christian Ott ott@enolink.de
use stdio(3)
Matthias-Christian Ott ott@enolink.de
add description of std
Matthias-Christian Ott ott@enolink.de
add prototype for command parsing
Matthias-Christian Ott ott@enolink.de
correct year of copyright notice
Matthias-Christian Ott ott@enolink.de
simplify Makefile Due to consideration of POSIX compliance issues config.mk had to be removed. Configuration variables can be overridden by environment variables or specified via command line. Additionally all pretty-printed messages were removed and built-in rules are used. This also simplifies and purges the Makefile.
Matthias-Christian Ott ott@enolink.de
reunite pty.c with std.c
Matthias-Christian Ott ott@enolink.de
correct programme name
Matthias-Christian Ott ott@enolink.de
use errx() for help and version messages
Matthias-Christian Ott ott@enolink.de
merge with backout head
Matthias-Christian Ott ott@enolink.de
remove TODO
Matthias-Christian Ott ott@enolink.de
make ptm and pts static
Matthias-Christian Ott ott@enolink.de
remove useless variable
Matthias-Christian Ott ott@enolink.de
remove emallocz()
Matthias-Christian Ott ott@enolink.de
replace eprint() functions with BSD error functions
Matthias-Christian Ott ott@enolink.de
simplify flushing
Matthias-Christian Ott ott@enolink.de
correct buffering
Matthias-Christian Ott ott@enolink.de
make local functions and variables static
Matthias-Christian Ott ott@enolink.de
add select(2)-based i/o multiplexing
Matthias-Christian Ott ott@enolink.de
drop stdio usage Std requires I/O multiplexing which is very complicated with stdio, because it provides no transparent buffering.
Matthias-Christian Ott ott@enolink.de
make st and std separate programmes
Matthias-Christian Ott ott@enolink.de
add missing header file
Matthias-Christian Ott ott@enolink.de
assume glibc by default
Matthias-Christian Ott ott@enolink.de
source utility functions out to util.c
Matthias-Christian Ott ott@enolink.de
add copyright comment
Matthias-Christian Ott ott@enolink.de
source getpty() out to pty.c
Matthias-Christian Ott ott@enolink.de
update TODO
Matthias-Christian Ott ott@enolink.de
correct function name
Matthias-Christian Ott ott@enolink.de
remove xinerama flags The xinerama related variables in config.mk are a relict of dwm and therefore should be removed.
Matthias-Christian Ott ott@enolink.de
add missing header file
Matthias-Christian Ott ott@enolink.de
add parser loop
Matthias-Christian Ott ott@enolink.de
remove useless variable
Matthias-Christian Ott ott@enolink.de
replace state with separate variables
Matthias-Christian Ott ott@enolink.de
terminate error message with newline
Matthias-Christian Ott ott@enolink.de
correct LENGTH()
Matthias-Christian Ott ott@enolink.de
simplify control flow
Matthias-Christian Ott ott@enolink.de
remove debug code
Matthias-Christian Ott ott@enolink.de
remove stdio slave pty opening
Matthias-Christian Ott ott@enolink.de
drop support for proprietary UNIX variants Proprietary UNIX variants like AIX, HP-UX or SCO UNIX are nowadays rarely used and maintaining compatibility to non-standard operating systems interfaces is wasteful and practically useless. Projects like xterm suffer from backward compatibility to decades-old UNIX variants and terminal standards. This does not conform to st's design goals.
Matthias-Christian Ott ott@enolink.de
slight changes
Anselm R Garbe garbeam@gmail.com
applied Matthias-Christians changes to std.c
Anselm R Garbe garbeam@gmail.com
added some new files for the initial rewrite of st from scratch
Anselm R Garbe garbeam@gmail.com
added new TODO
arg@localhost.localdomain unknown
Backed out changeset d2bb4220fdf3 Ptm and pts are used by pty.c, thus they have to be non-static.
Matthias-Christian Ott ott@enolink.de
fix warning
pancake pancake@nopcode.org
Fix unused variable issue and OSX includes
pancake@nopcode.org unknown
change "op" cap in terminfo entry to xterm/rxvt value.
Aurélien Aptel aurelien.aptel@gmail.com
fix custom key handling.
Aurélien Aptel aurelien.aptel@gmail.com
drawregion() only copies region on screen.
Aurélien Aptel aurelien.aptel@gmail.com
some minor fixes
anselm@garbe.us unknown
use typedef'd unsigned type and regular bool type.
Aurélien Aptel aurelien.aptel@gmail.com
Fixed lock up when system time jumps backwards Signed-off-by: Christoph Lohmann <20h@r-36.net>
Rob Pilling rob@egbert
Removing the w3img support. The patch to add w3img support destroys our way to handle fps and so stop wasting resources on fast scrolling. Due to w3img being a hack to display images in an ugly way, is there no need to support this. Use some real way to display images.
Christoph Lohmann 20h@r-36.net
Style cleanup. Add some note about the main reason why st is still that big.
Christoph Lohmann 20h@r-36.net
Style matters.
Christoph Lohmann 20h@r-36.net
Removing two unnecessary gettimeofday().
Christoph Lohmann 20h@r-36.net
FAQ: fix wording
Alexander Huemer alexander.huemer@xx.vu
arg.h wasn't used for dist.
Christoph Lohmann 20h@r-36.net
Handle pasting of empty selection. Otherwise, pasting the X11 primary selection when empty results an error and Xlib forcibly exits. Signed-off-by: Christoph Lohmann <20h@r-36.net>
Alex Pilon alp@alexpilon.ca
Implement most ICCCM rules for selection handling. ICCCM mandates the use of real timestamps to interact with the selection, to rule out race conditions if the clients are run at different speeds. I have implemented the low hanging fruit, putting the timestamps into text selection. Also, ICCCM mandates a check for whether XSetSelectionOwner() worked. Not sure my version is correct, though.
Markus Wichmann nullplan@gmx.net
Merge branch 'master' of ssh://suckless.org/gitrepos/st
Roberto E. Vargas Caballero k0ga@shike2.com
Do not use tmoveto in tputtab. tmoveto resets CURSOR_WRAPNEXT. Simple testcase: for i in $(seq 1 200); do printf '\t.'; usleep 100000; printf '\t@'; usleep 100000; done In st executing this script causes @ and . to overwrite each other in the last column.
noname@inventati.org noname@inventati.org
Move common code to xloadcolor
noname@inventati.org noname@inventati.org
Use LEN(dc.col) instead of LEN(colorname). LEN(colorname) may be below 256 for some configurations.
noname@inventati.org noname@inventati.org
Fix the new -e handling. An empty cmd has to work for backwards compatibility.
Christoph Lohmann 20h@r-36.net
Do not mark as invalid UTF8 control codes wcwidth() returns -1 for all the non visible characters, but it doesn't necessarilly mean that they are incorrect. It only means that they are not printable.
Roberto E. Vargas Caballero k0ga@shike2.com