Hiltjo Posthuma
b650256044
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'
6 years ago
Hiltjo Posthuma
9acec468fb
minor code-style, initialize var at the top of function
6 years ago
Hiltjo Posthuma
927621f6da
config.def.h: tweak extra worddelimiters
This changes the selection more like xterm.
To test try: "find /" and select a path.
6 years ago
Lauri Tirkkonen
add0211522
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.
6 years ago
Lauri Tirkkonen
d5efd256aa
replace utf8strchr with wcschr
6 years ago
Lauri Tirkkonen
75b4ba4b4b
be silent about explicitly unhandled mouse modes
6 years ago
Hiltjo Posthuma
ed68fe7dce
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."
6 years ago
Hiltjo Posthuma
4e0135afec
style: remove double empty newlines
6 years ago
magras
a8cb8e9454
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.
6 years ago
Ivan Tham
e85b6b6466
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
6 years ago
Hiltjo Posthuma
75f92eb348
bump version to 0.8.2
6 years ago
Hiltjo Posthuma
3be4cf11d7
config: add Shift+Insert as selpaste() again
This was changed before in:
commit 20f713548d
on Wed Jan 25 19:17:38 2017
6 years ago
Paride Legovini
16d98738e7
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.
6 years ago
Paride Legovini
e23acb9188
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.
6 years ago
Hiltjo Posthuma
7e19e11676
Makefile: fix dependencies on config.h
patch by Younes Khoudli (changed slightly). Thanks
6 years ago
Lauri Tirkkonen
096b125db7
output child WEXITSTATUS/WTERMSIG on abnormal termination
6 years ago
Hiltjo Posthuma
d7bf023b2f
fix memory leak in xloadcols()
reported by Avi Halachmi (:avih)" <avihpit@yahoo.com>
patch slightly changed by me.
6 years ago
Hiltjo Posthuma
b4d68d4daa
st: small typofix in comment
6 years ago
Hiltjo Posthuma
30ec9a3dc3
small code-style fix
6 years ago
Quentin Rameau
67d0cb65d0
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!
6 years ago
Hiltjo Posthuma
4f4bccd162
Revert "Simplify cursor color handling"
This reverts commit 1911c9274d
.
6 years ago
Hiltjo Posthuma
8ed7a4b3b7
Revert "Make cursor follow text color"
This reverts commit b51bcd5553
.
6 years ago
Hiltjo Posthuma
732be223ee
Revert "Fix crash when cursor color is truecolor"
This reverts commit 5535c1f04c
.
6 years ago
Jules Maselbas
5535c1f04c
Fix crash when cursor color is truecolor
Reported-by: Ivan Tham <pickfire@riseup.net>
6 years ago
Jules Maselbas
b51bcd5553
Make cursor follow text color
6 years ago
Jules Maselbas
1911c9274d
Simplify cursor color handling
6 years ago
Jules Maselbas
29f341da7c
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.
7 years ago
Hiltjo Posthuma
dc3b5babf1
config.mk: remove extra newline before EOF
7 years ago
Hiltjo Posthuma
235a783e03
code-style for pledge(2)
feedback from Klemens, thanks
7 years ago
Hiltjo Posthuma
30ce2cc002
Pledge on OpenBSD
7 years ago
Hiltjo Posthuma
041912a791
error message style and use strerror in a few places
7 years ago
Hiltjo Posthuma
bd3f7fd842
st -v: remove years and copyright text
7 years ago
Daniel Tameling
74cff67bd7
set sel.alt in selstart instead of selextend
7 years ago
Hiltjo Posthuma
6f0f2b7ec3
bump version to 0.8.1
7 years ago
Hiltjo Posthuma
f4020b2cc4
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!
7 years ago
Hiltjo Posthuma
a5a928bfc1
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.
7 years ago
Hiltjo Posthuma
6ac8c8aa50
selextend: clarify: !sel.mode == SEL_IDLE
7 years ago
Hiltjo Posthuma
5345db3c9b
clipcopy: no need to check for free(NULL), set to NULL after free
7 years ago
Hiltjo Posthuma
7648697f71
minor code-style: whitespace fixes
7 years ago
Quentin Rameau
0b507bb731
Fix title initialization
7 years ago
Quentin Rameau
e7ef3c4ce9
Fix regression from 69e32a6
when setting title.
7 years ago
Hiltjo Posthuma
8ab629031b
LICENSE: fix a few years
7 years ago
Hiltjo Posthuma
a712c2dd18
update LICENSE: major contributors
7 years ago
Hiltjo Posthuma
0f245dfeb9
Makefile: add all files to make dist
7 years ago
Hiltjo Posthuma
49a4f91fc5
bump version to 0.8
7 years ago
Hiltjo Posthuma
c5ba9c025b
use math.h for ceilf
7 years ago
Hiltjo Posthuma
b81888ee7d
xhints: no need to initialize sizeh
7 years ago
Hiltjo Posthuma
8b8255ac0e
regression: include termios.h for tcsendbreak etc
7 years ago
Devin J. Pohly
20e0da7f14
General cleanup
Simplifies logic in a couple places and removes a redundant function
call.
Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
7 years ago
Devin J. Pohly
403c57ebb5
Clean up #includes
Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
7 years ago