A change in GLib 2.63 broke some assumptions in Irssi that the null-byte
NUL / U+0000 is a valid Unicode character. This would occur when the
user types Ctrl+Space. As a result, the input loop never manages to
process the NUL-byte (and any other user input that follows, ever).
This patch adds a manual check that properly advances the input loop if
GLib returns -2 (incomplete character) despite the length being positive
and a NUL is in first position.
Fixes#1180https://gitlab.gnome.org/GNOME/glib/-/merge_requests/967https://gitlab.gnome.org/GNOME/glib/-/issues/2093
This adds a i_wcwidth() function that replaces mk_wcwidth(), and a
'wcwidth_implementation' setting to pick which one it wraps.
Values:
- old: uses our local mk_wcwidth() which implements unicode 5.0
- system: uses the libc-provided wcwidth(), which may be better or worse
than ours depending on how up to date the system is.
- auto: tests the system one against two characters that became
fullwidth in unicode 5.2 and 9.0 respectively. If either of them pass,
pick the system implementation, otherwise pick ours.
It defaults to auto.
mk_wcwidth() is still preferable in some cases, since the way it uses
ranges for fullwidth characters means most CJK blocks are covered even
if their characters didn't exist back then.
The "system" implementation is also wrapped to never return -1, but to
assume those unknown characters use one cell. Quoting the code:
/* Treat all unknown characters as taking one cell. This is
* the reason mk_wcwidth and other outdated implementations
* mostly worked with newer unicode, while glibc's wcwidth
* needs updating to recognize new characters.
*
* Instead of relying on that, we keep the behavior of assuming
* one cell even for glibc's implementation, which is still
* highly accurate and less of a headache overall.
*/
warning:
* may be buggy
This commit adds support for sideways splits into Irssi. To that regard,
there are a number of new commands available
the "R" commands:
/window new rsplit - make a new sideways split
/window rshow - show an existing window to the right
/window rgrow/rshrink/rsize/rbalance
- manipulate the size of your sideways split windows
the "D" commands:
/window dup/ddown/dleft/dright
- navigate the windows directionally, as an alternative to
/window up/down that you can bind to some key
/window move dleft/dright - the same for moving
Enjoy!
Fixes#733. The fix outlined in #452 had adverse effects for the
following reason. The code removed the restoration path that would go on
the code path from kill SIGTSTP. The problem is this: When Irssi is not
running in a controlling parent (like a shell), the TSTP will in fact be
ignored. In that case, there is no process sending a CONT either and
thus the screen state never gets restored. Luckily, the patch in #457 is
sufficient to prevent the problem in #450 (which lead to the development
of #452). To that end, we do end up with potentially calling
terminfo_cont twice but that is better than not calling it at all.
This reverts commit b1ffd5f647, reversing
changes made to 9cb0419435.
Perl sucks and kills the whole process when there's a version mismatch
in Perl_xs_handshake(). Our atexit handler catches the exit and
deinitializes the terminal, removing the error.
This commit uses the 'quitting' global variable which is set when irssi
is voluntarily quitting, and avoids sending TI_rmcup, which restores the
original screen and makes the error invisible.
term_addstr() had a long-standing fixme that suggested it didn't
take into account the string encoding when calculating the string
length.
The BIG5 code path is untested.
Before this, doing "TERM=vt100 irssi" showed all text as bold and
blinking because of a failed check of window->term->TI_colors that
was doing (value & 8) and not expecting a value of 0.
The changed lines themselves look a bit weird, but they make more sense
in the context of the original commit, 96a292d4.
this fixes a crash due to illegal memory access that can occur if
something is printed to the screen on the "terminal resized"
handler. It is not clear to me whether this race condition can be
triggered by external incoming messages, but it might be better safe
than sorry.
the colour 0 was broken by the extended colours patch because it needs
an explicit bit check (lower bits will be false since it is 0)
Thanks to lhynes for the report
256 colour patch is cleaned up and the remaining cases are made work,
this includes especially Theme support, which was not implemented
before. Changes not related to colours were reverted again, making a
review of the two patches against master easier to follow.
As a byproduct of the Hex-colour code parser, the 24bit colours are
also implemented. Actually using them in the terminal is guarded by a
compile time switch (as well as a run time switch), as it breaks the
existing colour protocol and requires additional storage.
To make a seamless usage, down-conversion is provided for 8 and 16
colours.
Diverging from Tom's approach, the colour protocol is reverted back to
the original one. Unfortunately, the changes required in the Theme
engine will break the API.
For more details, please refer to the patch documentation at either
http://irssi-docs.wikispaces.com/Notes-256-Colour or
https://github.com/shabble/irssi-docs/wiki/Notes-256-Colour
This patch implements some 256 colour support for Irssi up from the
previous 16 colours. Initial parsing of the %x/%X format codes is
implemented and the parser accounts in advances the char* for
that.
The colour attributes are widened from 4 to 8 bit. The colour protocol
is changed to a new format. Some pointers to remaining work are
written in the comment in textbuffer.h.
Note that Irssi already does support requesting 256 colours from the
terminal in the original source code, so this part did not have to be
touched.
subsequent reads are associated to the same paste if they happen before
'paste_detect_time' time since the last read. If no read occurs after
'paste_detect_time' time the paste buffer is flushed; if there is at least one
complete line its content is sent as a paste, otherwise it is processed
normally.
Thanks to Emanuele Giaquinta.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5121 dbcabf3a-b0e7-0310-adc4-f8d773084564
the eighth bit of the color. The formats KBGCRMYW and the mirc colors are now
mapped to colors 8-15. fe-text translates colors 8-15 to bold/blink+0-7 if the
terminal supports only 8 colors.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4909 dbcabf3a-b0e7-0310-adc4-f8d773084564