1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00
Commit Graph

1032 Commits

Author SHA1 Message Date
Ailin Nemui
d20d2753da autoload modules from default setting 2021-04-03 21:25:18 +02:00
ailin-nemui
a731525012
Merge pull request #1290 from mistydemeo/check_for_term_h
Add a check for term.h
2021-04-01 21:28:04 +02:00
Misty De Meo
0b82f14151
Add a check for term.h
If term.h is present, use that instead of defining prototypes for the
terminfo functions in terminfo-core.c. This causes problems on certain
platforms (e.g. Apple aarch64) due to the functions being prototyped as
non-variadic but called as variadic. If term.h isn't found, it falls
back to the old behaviour.

Fixes #1238.
2021-03-27 10:54:30 -07:00
Ailin Nemui
030da3ec9c add format_string_expand and format_string_unexpand methods to Perl 2021-03-14 19:00:22 +01:00
Ailin Nemui
4e1aad6679 fix assertion failure when the line does not have text (yet) 2021-03-05 20:28:10 +01:00
ailin-nemui
d535a79730 implement server-time 2021-02-25 10:41:05 +01:00
ailin-nemui
33d8cc3254 GLib < 2.56 compat code for g_date_time_new_from_iso8601 2021-02-25 10:41:05 +01:00
ihsinme
39ed1ba055
Update gui-entry.c 2021-02-05 22:48:43 +03:00
ihsinme
5e88c107f1
Update gui-entry.c 2021-02-05 18:36:15 +03:00
ihsinme
33bfd88d9e
Update gui-entry.c 2021-02-05 18:34:54 +03:00
Ailin Nemui
e7f3946583 configure automake with nostdinc
the current directoryh won't be added to the compiler's -I path
2021-02-02 00:24:34 +01:00
ailin-nemui
db9aa817d5
Merge pull request #1246 from ailin-nemui/wrong-prefixes
correct wrong function prefixes

Module authors will have to adapt these changes:

    [M] 'constant I_INPUT_READ'    {G_INPUT_READ}
    [M] 'constant I_INPUT_WRITE'    {G_INPUT_WRITE}
    [M] 'function int i_input_add(GIOChannel*, int, GInputFunction, void*)'    {g_input_add}
    [M] 'function int i_input_add_full(GIOChannel*, int, int, GInputFunction, void*)'    {g_input_add_full}
    [M] 'function int i_input_add_poll(int, int, int, GInputFunction, void*)'    {g_input_add_poll}
    [M] 'function GIOChannel* i_io_channel_new(int)'    {g_io_channel_new}
    [M] 'function int i_io_channel_read_block(GIOChannel*, void*, int)'    {g_io_channel_read_block}
    [M] 'function int i_io_channel_write_block(GIOChannel*, void*, int)'    {g_io_channel_write_block}
    [M] 'function int i_istr_cmp(gconstpointer, gconstpointer)'    {g_istr_cmp}
    [M] 'function int i_istr_equal(gconstpointer, gconstpointer)'    {g_istr_equal}
    [M] 'function guint i_istr_hash(gconstpointer)'    {g_istr_hash}
    [M] 'function void i_log_func(const char*, GLogLevelFlags, const char*)'    {glog_func}
    [M] 'function GSList* i_slist_delete_string(GSList*, const char*, GDestroyNotify)'    {gslist_delete_string}
    [M] 'function GSList* i_slist_find_icase_string(GSList*, const char*)'    {gslist_find_icase_string}
    [M] 'function GSList* i_slist_find_string(GSList*, const char*)'    {gslist_find_string}
    [M] 'function void* i_slist_foreach_find(GSList*, FOREACH_FIND_FUNC, void*)'    {gslist_foreach_find}
    [M] 'function void i_slist_free_full(GSList*, GDestroyNotify)'    {gslist_free_full}
    [M] 'function GSList* i_slist_remove_string(GSList*, const char*)'    {gslist_remove_string}
    [M] 'function char* i_slist_to_string(GSList*, const char*)'    {gslist_to_string}
2021-01-30 21:09:26 +01:00
ailin-nemui
ea5121da3b
Merge pull request #1252 from ailin-nemui/build-fixes-test-actions
fix autotools build and package the meson.build files
2021-01-11 11:15:57 +01:00
Ailin Nemui
16b1d58703 Abort Irssi on wrong entries in the channels or servers config 2021-01-07 16:31:11 +01:00
Ailin Nemui
504cf21783 correct wrong function prefixes: remove g_free_true 2021-01-07 10:14:34 +01:00
Ailin Nemui
edb2f699d1 correct wrong function prefixes: g_input -> i_input 2021-01-07 10:09:45 +01:00
Ailin Nemui
1f05f86167 package the meson.build files 2021-01-06 22:12:46 +01:00
ailin-nemui
76802985a4
Merge pull request #1183 from ailin-nemui/glib-2-63
manually handle NUL unicode in g_utf8_get_next_char_validated
2020-07-08 17:43:11 +02:00
ailin-nemui
37cac5a862
Merge pull request #1205 from ailin-nemui/formatflags
properly restore the saved text dest
2020-07-08 10:07:07 +02:00
ailin-nemui
0cc1e4b7cd properly restore the saved text dest 2020-07-04 18:19:37 +02:00
ailin-nemui
108f57ac7b fix extended bg colours 2020-07-04 12:15:25 +02:00
ailin-nemui
d5017cfc7c make actlist_sort a choice type now that we have it 2020-05-24 18:44:25 +02:00
ailin-nemui
4330dbec62 add "print format" signal to perl
fix syntax in signals.txt with regards to GLists

simplify signal emit code
2020-05-13 00:22:38 +02:00
ailin-nemui
ba57684d73 fix NULL assertion in format args 2020-05-08 15:34:49 +02:00
ailin-nemui
08ead5ef06 fix npe on no text from format_get_text_theme_charargs 2020-05-07 01:27:25 +02:00
ailin-nemui
449d86caf0 add setting to disable reformat 2020-04-28 15:46:53 +02:00
ailin-nemui
8fd6dccaf1 enable mirc colour processing 2020-04-28 15:46:53 +02:00
ailin-nemui
a0544571a8 manually handle NUL unicode in g_utf8_get_next_char_validated
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 #1180
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/967
https://gitlab.gnome.org/GNOME/glib/-/issues/2093
2020-04-28 15:40:21 +02:00
ailin-nemui
6b93d6e338 implement expando cache
- the expando values need to be stored now that the lines are
  reformattable, otherwise the old values are lost (and they depend on
  context only available at the time the line is initially printed)

- the cache is collected from the special-vars evaluation code

- the cache is controlled by the textbuffer-formats code, and stored in
  the text_buffer_format_rec
2020-04-26 20:42:02 +02:00
ailin-nemui
f95fc81130 make lines reformattable
- completely removed the old textbuffer representation (
  https://github.com/shabble/irssi-docs/wiki/Notes-256-Colour#textbuffer-encoding
  )

- textbuffer-formats is an extra module, so if we unhook the signals it
  should go back to the "old way" of storing pre-rendered tex

- design uses cache, original formats and list of arguments
2020-04-26 18:54:16 +02:00
=
1bfe27c66e Used Tabs instead of spaces and increased ABI_VERSION 2020-04-06 17:04:35 +02:00
Dennis Pentmeier
f9595c03b1 Changed to async-signal safe method as suggested by dequis 2020-04-04 18:07:08 +02:00
ailin-nemui
e59c42bcc0 refine zero width input test in empty line
fixes #1153
2020-02-07 16:33:53 +01:00
ailin-nemui
1cdb4bc311 remove GTimeVal following glib 2.61.2 deprecation 2019-12-06 10:56:25 +01:00
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
5776ca5e0b bottom_startline lost? 2019-10-13 21:35:30 +02:00
ailin-nemui
44b060ce17 fix crash on startup when resizing before active_win 2019-08-27 12:42:20 +02:00
ailin-nemui
ad7ad063ca implement reference counted strings
- on glib >=2.58, use the implementation provided by glib
- otherwise, a hash table will contain the strings
2019-08-14 20:50:44 +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
db16a0a853 meson build support 2019-07-10 09:25:26 +02:00
ailin-nemui
8551dd99cc
Merge pull request #1057 from ailin-nemui/entry-8bit
restore 8bit support in input entry
2019-06-28 11:29:19 +02:00
ailin-nemui
8d11060fbc Use the 24bit mIRC colour mappings if colors_ansi_24bit is enabled 2019-06-18 14:55:47 +02:00
ailin-nemui
38b6284535 restore 8bit support in input entry 2019-06-17 14:58:34 +02:00
Doug Freed
1d6aeb08fd fe-text/mainwindows: fix /window balance warning
mainwindow_resize() expects that the mainwindow's height has not yet
been updated, as it updates it itself, and throws a warning otherwise.
2019-06-09 23:10:05 +00:00
ailin-nemui
37f7c7f374 update include guard names 2019-05-01 22:22:22 +02:00
ailin-nemui
7e6e1f2e10 Use full paths to includes 2019-05-01 22:08:45 +02:00
ailin-nemui
796b60dd45
Merge pull request #1025 from vague666/prefer_window_name
Add setting to choose between window name and visible name in actlist
2019-04-15 10:52:52 +02:00
vague666
9d9d99eeb1 move caching to correct place :) 2019-04-08 12:32:58 +02:00
vague666
9cdeed2894 cache bool value 2019-04-02 09:39:03 +02:00
vague666
22502abf2c Add setting to choose between window name and visible name in actlist 2019-03-22 19:10:10 +01:00
Heikki Orsila
6a2823ad3e Implement a method to delete messages older than given time in scrollback history.
The maximum age of messages is controlled by /set scrollback_max_age variable.
E.g. /set scrollback_max_age 7days
2019-03-13 22:59:24 +02:00
ailin-nemui
ff18e79661
Merge pull request #994 from ailin-nemui/fix-993
add more config checks and assertions in statusbar code
2019-02-02 14:34:59 +01:00
ailin-nemui
f9beedd2d0 add more config checks and assertions 2019-01-22 15:24:52 +01:00
ailin-nemui
3af2ce8731 add activity_hide_visible setting 2019-01-15 21:02:27 +01:00
ailin-nemui
b080405c6a update sidewayssplit syntax 2019-01-09 23:46:57 +01:00
ailin-nemui
c1fb9a8402 fix paste_join_multiline 2018-11-09 11:06:13 +01:00
ailin-nemui
cee9d09deb
Merge pull request #955 from ailin-nemui/split-width-bug
fix and document window width on screen width dependency
2018-10-05 10:49:50 +02:00
ailin-nemui
b96a41cf3d
Merge pull request #951 from dwfreed/patch-1
fe-text: clear hidelevel in layout if default
2018-10-05 10:47:12 +02:00
ailin-nemui
011372ecdd
Merge pull request #948 from ailin-nemui/invalid-startline
invalidate startline and bottom_startline when hidden
2018-10-02 00:08:30 +02:00
ailin-nemui
ca1ec21dc2 fix and document window width on screen width dependency 2018-10-01 09:14:03 +02:00
ailin-nemui
7ab52e73c6
Merge pull request #947 from ailin-nemui/rsplit-collapse
Fix broken display after resizing many windows very small
2018-09-29 22:03:06 +02:00
ailin-nemui
630c6f7e14
Merge pull request #946 from ailin-nemui/resize-freeze
fix irssi being stuck when resized very small
2018-09-29 22:02:29 +02:00
ailin-nemui
116e202d22
Merge pull request #938 from ailin-nemui/hide-hidden-act
Don't trigger activity on hidden lines by default
2018-09-29 22:02:10 +02:00
Doug Freed
b264540f4e
fe-text: clear hidelevel in layout if default
This is required, otherwise setting the hidelevel to the default will
not be written in the layout and so won't persist.
2018-09-29 07:13:32 -04: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
76b934d18e Fix broken display after resizing many windows very small 2018-09-26 15:21:08 +02:00
ailin-nemui
db005007cf fix irssi being stuck when resized very small 2018-09-26 14:18:37 +02:00
ailin-nemui
01f961cdf1 Don't trigger activity on hidden lines by default
This is controlled by a new activity_hide_window_hidelevel setting.
2018-09-24 08:18:13 +00:00
ailin-nemui
cdfd75da98
Merge pull request #941 from dwfreed/window_default_hidelevel
Add window_default_hidelevel setting
2018-09-23 11:22:46 +02:00
ailin-nemui
ee92e3aff2
Merge pull request #939 from ailin-nemui/fix-modules
some header fixes for C modules
2018-09-20 17:38:03 +02:00
Doug Freed
cad79f1db7 Fix compilation warning 2018-09-17 14:34:06 +00:00
Doug Freed
074e6cf768 fe-text: only save non-default window hidelevel
This will only save the window hidelevel in the layout if it differs
from window_default_hidelevel.
2018-09-17 14:26:25 +00:00
Doug Freed
cb6279c63b fe-text: add window_default_hidelevel setting
Allows specifying the hidelevel that new windows get by default.
2018-09-17 13:28:46 +00:00
ailin-nemui
20dcf4e53e fix compilation of python module 2018-09-14 12:44:41 +02:00
ailin-nemui
c174247502 fix compilation of theme-indent module 2018-09-14 11:59:05 +02:00
ailin-nemui
74e8371bde fix accessing unallocated text when checking entry position
fixes #928
2018-09-04 14:12:03 +02:00
ailin-nemui
7f14d4d744
Merge pull request #896 from phillid/winch-redraw
Don't ignore SIGWINCH when window size is unchanged
2018-09-04 10:02:52 +02:00
ailin-nemui
d93cd63243
Merge pull request #917 from dequis/wcwidth-wrapper
Add a wrapper of wcwidth() that picks the best implementation
2018-09-04 09:52:21 +02:00
dequis
92804cb1aa gui-windows: make the wcwidth_impl global var into static 2018-08-27 00:01:47 -03: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
af1e4d6e34 initialise the line to zeros 2018-08-21 09:21:23 +02:00
ailin-nemui
a19b503a31 properly record line info on empty lines 2018-08-21 00:31:12 +02:00
David Phillips
10f6326649 Redraw on SIGWINCH when screen size hasn't changed
Some programs and users send SIGWINCH as a request for the client to redraw
in the event of session detachment/reattachment (e.g. abduco). A well-formed
terminal will only send SIGWINCH when the window size has changed, so there
is no need to optimise this case out.
2018-08-06 14:58:56 +12:00
ailin-nemui
631650bd8a
Revert "record line info on empty lines" 2018-05-07 21:22:43 +02:00
ailin-nemui
34b31e8451 record line info on empty lines 2018-04-16 16:22:04 +02:00
ailin-nemui
8bf2162053
Merge pull request #858 from ailin-nemui/sbar
change the statusbar commands so that no accidential status bars are created
2018-04-02 08:36:53 +02:00
ailin-nemui
0c1db8f2ae
Merge pull request #854 from irssi/ahf/otr
OTR support, take 2
2018-03-31 13:04:35 +02:00
ailin-nemui
138eca0749 fix build 2018-03-20 18:13:26 +01:00
ailin-nemui
ee04cd503f add disabled txt 2018-03-20 17:59:11 +01:00
ailin-nemui
977c2c0a0d refactor common parts 2018-03-20 17:53:03 +01:00
ailin-nemui
501c150ec2 make new status bar actually work 2018-03-20 17:39:08 +01:00
ailin-nemui
61c58b7690 actually check which of add or modify was called 2018-03-19 10:35:39 +01:00
ailin-nemui
d845ee7361 change the statusbar commands so that no accidenal status bars are created 2018-03-19 09:59:22 +01: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
65a139aa9e move no window printing code 2018-03-16 12:54:15 +01:00
ailin-nemui
b7906b8706 in fact hidden levels should not be re-set when you run /set 2018-03-15 10:06:29 +01:00
Alexander Færøy
016b42baea Add OTR support.
This patch adds support for the OTR protocol to irssi. This is an import
of the external irssi-otr project that we are now taking over
maintership for.

Major thanks to the original authors of Irssi-OTR: Uli Meis and David
Goulet. Thanks to the OTR community in #OTR on OFTC, thanks to everyone
who have helped testing the patches and submitted UI suggestions.
2018-02-26 23:32:57 +01:00
ailin-nemui
8183180613
Merge pull request #764 from GinjaNinja32/colorful-input
Add color support for input bar
2018-02-05 22:28:08 +01:00
ailin-nemui
3c1bc5f916
Merge pull request #836 from ailin-nemui/resize
Fix resizing of windows when used incorrectly
2018-02-05 22:25:33 +01:00