1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-23 06:35:36 +00:00
Commit Graph

102 Commits

Author SHA1 Message Date
ailin-nemui
5776ca5e0b bottom_startline lost? 2019-10-13 21:35:30 +02:00
ailin-nemui
c92ff1701f fix cut off text with theme-indent and /set indent_always off 2019-07-28 00:55:19 +02:00
ailin-nemui
7e6e1f2e10 Use full paths to includes 2019-05-01 22:08:45 +02:00
ailin-nemui
8684ccb45c invalidate startline and bottom_startline when hidden
this was overlooked when adding hidden line support. if the lines are
removed, Irssi has to update the startline. It does that by "scrolling"
the lines to the proper place. The scroll function was adjusted to
calculate 0 for hidden lines, thus it would miss them.
2018-09-28 11:41:30 +02:00
ailin-nemui
b2a429bfb4 update line cache on switching wcwidth implementation 2018-08-23 14:03:53 +02:00
dequis
0d8632943d Add a wrapper of wcwidth() that picks the best implementation
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.
     */
2018-08-23 02:30:26 -03:00
ailin-nemui
c7ca8102c0 fix a crash when trying to append to a NULL line
reported by @vague666
2018-03-17 13:36:38 +01:00
ailin-nemui
a6663c58d4
Merge pull request #697 from ailin-nemui/rsplit
sideways split support for Irssi
2018-01-08 12:20:20 +01:00
ailin-nemui
ded4e4d98d fix redraw 2018-01-06 01:05:35 +01:00
ailin-nemui
4e71a1f485 sideways split support for Irssi
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!
2018-01-06 00:26:48 +01:00
ailin-nemui
8dfeca57ed hidden lines 2017-09-21 14:20:31 +02:00
ailin-nemui
d61c54c32b do not reset true colour bit on colour reset
fixes #710
2017-05-27 00:12:54 +02:00
ailin-nemui
4031b92b9b Merge pull request #626 from ailin-nemui/textbuffer_monospace
support storing and replaying the monospace attribute in textbuffer
2017-01-31 14:17:44 +01:00
ailin-nemui
876c1dd93e implement break_wide
for more pleasant east asian mixed display
2017-01-20 10:32:23 +01:00
Michael Vetter
51239925ec source cleanup: remove trailing whitespaces 2014-09-11 19:10:33 +02:00
Ailin Nemui
98435fb464 support storing and replaying the monospace attribute in textbuffer 2014-09-11 18:15:06 +02:00
Ailin Nemui
8e062b7bd0 fix uninitialised copy on 24bit colours 2014-07-18 13:56:02 +02:00
Lukas Mai
0e294d5c2e add italics support; don't use standout for reverse 2014-07-07 00:32:07 +02:00
Alexander Færøy
b03b65e029 Merge pull request #85 from dgl/werror
Make configure checks able to build with -Werror
2014-07-06 23:05:34 +02:00
David Leadbeater
beec29c305 Make configure checks able to build with -Werror
Also fix a few compiler warnings, this combined with pull #82 allows me to build
with CFLAGS="-Werror -Wall".
2014-07-06 18:56:17 +01:00
Ailin Nemui
c104627462 fix compiler warnings in extended colour code 2014-07-04 12:46:51 +02:00
Ailin Nemui
96a292d40e Finish 256 colour support for Irssi
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
2014-06-30 02:41:34 +02:00
Tom Feist
2d4edc5187 Initial implementation of 256 colour support for Irssi
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.
2014-06-30 00:54:16 +02:00
Ailin Nemui
e71c9f1b06 add print_text_after_time to specify time stamp for lines
add signal for line removal from textbuffer
2014-06-27 15:50:36 +02:00
Ailin Nemui
9ee8e66431 fix print_after scrollback 2014-06-11 11:00:26 +02:00
Emanuele Giaquinta
9fd6a3f3cf Replace invalid utf-8 bytes with U+FFFD when drawing a line.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4995 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-01-18 12:46:57 +00:00
Emanuele Giaquinta
fd6bd4d829 Remove broken and unused format to add an indent function to a line.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4982 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-01-13 18:31:31 +00:00
Emanuele Giaquinta
9dcea776a1 Remove buggy /scrollback redraw - scrollback_save_formats.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4981 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-01-10 18:38:08 +00:00
Emanuele Giaquinta
1b7296dc5f Revert r4964, at least one script uses ypos.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4965 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-12 10:42:14 +00:00
Emanuele Giaquinta
feb95100ce Remove ypos field of TEXT_BUFFER_VIEW_REC, it is used to compute the row
position where to draw a new line and if the view is at the bottom of the
textbuffer, but the same information can be computed more easily by other
means.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4964 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-11 20:59:21 +00:00
Emanuele Giaquinta
621761cff3 Handle bold/blink attributes like other attributes rather than mapping them to
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
2008-11-15 21:51:07 +00:00
Emanuele Giaquinta
5e4c08d8a1 Fix r4743 change, avoid sign extension.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4875 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-10-08 22:58:27 +00:00
Emanuele Giaquinta
e88bd31323 Use term_add_unichar to print ucs-4 chars.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4812 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-04-21 20:44:04 +00:00
Emanuele Giaquinta
ef47cde2b9 Rename variable.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4744 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-03-09 18:16:50 +00:00
Emanuele Giaquinta
b5fe742ace Replace usage of get_utf8_char with g_utf8_get_char_validated and
factor the corresponding code into a function.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4743 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-03-09 18:08:40 +00:00
Emanuele Giaquinta
b67f641ac1 Remove cuix from trunk.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4560 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-06-17 14:40:13 +00:00
Emanuele Giaquinta
5bcafebbd4 Assume width 1 for control characters in places where a non-negative width is
expected.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4535 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-31 13:56:35 +00:00
Emanuele Giaquinta
d3687d8a97 Rename IS_PRINTABLE macro to unichar_isprint and move it to utf8.h.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4534 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-31 13:19:05 +00:00
Emanuele Giaquinta
a8741bd799 Replace utf8_width with Markus Kuhn's wcwidth.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4518 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-25 21:56:30 +00:00
Wouter Coekaerts
9c2d621cc6 Oops. Update address correctly now.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4490 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-08 18:41:10 +00:00
Wouter Coekaerts
023026e12b Update FSF address
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4489 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-08 18:16:58 +00:00
Emanuele Giaquinta
7c84b6fc2e Add common IS_PRINTABLE macro.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4474 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-03 15:49:19 +00:00
Emanuele Giaquinta
87ee8e85ca When removing a line from the view also unconditionally remove any bookmark for
that line rather than moving it to the next/previous line, if any.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4433 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-03-12 22:54:45 +00:00
Timo Sirainen
e9681e4b9e UTF-8 0x80-0x9f characters weren't treated as control chars as they should have
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4425 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-02-20 12:39:17 +00:00
Emanuele Giaquinta
541fa72f46 Generalize window_lastlog_clear in textbuffer_view_remove_lines_by_level.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4419 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-02-17 15:31:10 +00:00
Emanuele Giaquinta
9c835d33b5 Set view->startline to NULL when the line to delete is the first of the view
buffer and there are no more lines in the view.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4350 dbcabf3a-b0e7-0310-adc4-f8d773084564
2006-09-14 22:11:19 +00:00
Emanuele Giaquinta
9bd7272d47 Revert r4343.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4349 dbcabf3a-b0e7-0310-adc4-f8d773084564
2006-09-14 20:57:22 +00:00
Emanuele Giaquinta
904e01175c Revert r4342.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4345 dbcabf3a-b0e7-0310-adc4-f8d773084564
2006-09-12 22:33:14 +00:00
Emanuele Giaquinta
9cdea0d608 Missing update of view->startline when the line to delete is the first of the
view and the first of the view buffer.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4343 dbcabf3a-b0e7-0310-adc4-f8d773084564
2006-09-12 17:19:47 +00:00
Emanuele Giaquinta
c08a754d1e Do not restore the previous view when deleting the first line of the current one.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4342 dbcabf3a-b0e7-0310-adc4-f8d773084564
2006-09-12 16:06:14 +00:00