1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-16 06:25:24 +00:00
Commit Graph

93 Commits

Author SHA1 Message Date
dequis
664c38afba Fix some glib deprecation warnings
Most of these have been deprecated since forever (2.2), but they didn't
raise warnings. Now they do, and the warnings are not the most verbose
warnings you could ask for, but, they point in the right direction.

This doesn't handle the GTimeVal deprecation warnings. Those seem
trickier since they cover API, will look into those right after this.
2019-10-31 23:49:40 +01:00
ailin-nemui
38b6284535 restore 8bit support in input entry 2019-06-17 14:58:34 +02:00
ailin-nemui
7e6e1f2e10 Use full paths to includes 2019-05-01 22:08:45 +02:00
ailin-nemui
74e8371bde fix accessing unallocated text when checking entry position
fixes #928
2018-09-04 14:12:03 +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
9072e98819 change color -> extents (malloc based) 2018-02-02 13:56:56 +01:00
GinjaNinja32
0f1b3873fe Don't accept pos<0 or len<0 in gui_entry_set_color 2018-01-18 10:08:00 +01:00
GinjaNinja32
13b93c8c05 Apply changes based on review feedback 2018-01-18 10:08:00 +01:00
GinjaNinja32
925ae6e6ad Add color support for input bar 2018-01-18 10:08:00 +01:00
ailin-nemui
0468c5d912 add new function to set the position in bytes
fixes #752
2017-09-15 13:47:01 +02:00
LemonBoy
251d8a686a Fix an OOB access in the cutbuffer implementation. 2016-08-24 22:29:52 +02:00
ailin-nemui
74d38683bf Merge pull request #480 from xavierog/handle-utf8-nicks-with-mk_wcwidth
Handle utf8 nicks with mk_wcwidth()
2016-05-18 09:18:21 +02:00
Xavier G
72064de9fe Simplify scrlen_str() using string_width(). 2016-05-13 04:19:38 +02:00
Xavier G
21c07c0060 Leverage string_policy(). 2016-05-13 02:27:19 +02:00
pisculichi
47e792da05 Fix some ANSI C issues. 2016-05-03 15:28:20 +00:00
ailin-nemui
aec2466e36 Improve cutbuffer handling
* Adds two new keys which you can bind in /bind:
  yank_next_cutbuffer: Revert to the previous last deleted text
  append_next_kill: Append next deletion
* Consecutive kills are now appended to the current cutbuffer
2016-03-29 15:20:45 +02:00
ailin-nemui
117c890d98 cutbuffer: do not unconditionally use replace when noop was requested 2016-03-22 14:43:31 +01:00
Todd A. Pratt
8723c0fb33 fix whitespace 2016-02-10 09:47:10 -05:00
Todd A. Pratt
966d002b55 remove memory allocation check, spaces to tabs 2016-01-30 11:32:08 -05:00
Todd A. Pratt
876609901a add an append operation to cut buffer handling 2016-01-30 09:34:46 -05:00
Todd A. Pratt
5d99a3d59a Merge branch 'master' of github.com:irssi/irssi 2015-12-09 20:48:21 -05:00
ailin-nemui
229c600e99 Merge pull request #174 from ailin-nemui/entry-prompt-colours
reimplement format and length logic for the entry prompt
2015-12-09 12:01:00 +01:00
Todd A. Pratt
15dfb27f80 use the enum name which was the original intended change 2015-11-14 09:07:35 -05:00
Todd A. Pratt
bb8c0bbf4c fix indentation, undelete line not meant to be deleted. 2015-11-13 20:33:57 -05:00
Todd A. Pratt
1199ecc62f a facility for prepending or replacing the cutbuffer 2015-11-13 13:42:28 -05:00
Todd A. Pratt
4f8974f66e Merge branch 'master' of github.com:toddpratt/irssi 2015-11-02 08:08:38 -05:00
Todd A. Pratt
3c95f6aae9 Make C-w and M-backspace work right. 2015-11-02 08:00:52 -05:00
Alexander Færøy
5f35fbc57a
Remove check for >= 0 for unsigned unichar. 2015-10-03 19:01:16 +02:00
Ailin Nemui
b03805eeb9 reimplement format and length logic for the entry prompt 2014-11-10 10:53:14 +01:00
Michael Vetter
51239925ec source cleanup: remove trailing whitespaces 2014-09-11 19:10:33 +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
Emanuele Giaquinta
d71aea5b2b Remove internal utf8 functions in favour of glib ones.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4958 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-09 11:59:16 +00:00
Emanuele Giaquinta
cba6199958 Cosmetic.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4957 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-09 11:45:23 +00:00
Emanuele Giaquinta
6c0463fbf7 Manually inline cell_width.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4942 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-03 20:14:58 +00:00
Emanuele Giaquinta
a266ce8d97 Simplify.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4941 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-03 19:09:54 +00:00
Emanuele Giaquinta
da86080d40 Move check on term_type outside of strlen_big5.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4917 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-18 09:59:54 +00:00
Emanuele Giaquinta
6331ffdc2b Revert r2471, having the erase commands clear the cutbuffer when the
line is empty is annoying and not useful.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4667 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-12-12 12:35:14 +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
4f98e29bab Make word commands unicode friendly.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4522 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-25 23:21:38 +00:00
Emanuele Giaquinta
8a9da9cf2d Add function to delete the whole cell under the cursor and use it for
delete_character.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4521 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-25 22:21:39 +00:00
Emanuele Giaquinta
ceea629e3e Move the cursor cell-wise in utf8.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4520 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-25 22:13:24 +00:00
Emanuele Giaquinta
a429e2bf23 Forbid insertion of a character with width 0 as the first character in
the prompt.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4519 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-25 22:06:32 +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
ac4bbd4a22 Reindent.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4450 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-04-14 20:26:22 +00:00
Emanuele Giaquinta
e2cc91c19a Modify gui_entry_draw_from to clear to end of line only if it has not
written till the last column.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4449 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-04-14 20:20:37 +00:00
Emanuele Giaquinta
ace371b2a3 Revert r4352.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4444 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-04-14 11:09:37 +00:00