1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-15 04:28:09 -04:00
Commit Graph

1032 Commits

Author SHA1 Message Date
ailin-nemui
b33ce255a9 check for negative bound 2018-02-04 11:34:20 +01:00
ailin-nemui
9072e98819 change color -> extents (malloc based) 2018-02-02 13:56:56 +01:00
ailin-nemui
5b5bfef035 check the error condition of mainwindow_create 2018-02-02 10:05:37 +01:00
ailin-nemui
f0bd434eb0 stop the madness 2018-02-02 09:50:08 +01:00
Niklas Luokkala
6dfe5bc836 modified gui-readline based on the suggestions made to the pull request 2018-01-24 22:12:09 +02:00
Niklas Luokkala
0ba1b1f2a4 removed unnecessary repetition 2018-01-24 01:49:28 +02:00
Niklas Luokkala
d14dbbd093 Add Shift-Tab completion to gui-readline 2018-01-24 00:15:29 +02: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
Zero King
d983ad1a87 Update Irssi website URLs 2018-01-16 15:23:54 +00: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
2e0815bfd7
Merge pull request #726 from dequis/term-environment-check
Add a startup warning if the TERM var is wrong inside tmux/screen
2018-01-08 12:19:30 +01:00
ailin-nemui
063c85da6c
Fix space in message 2018-01-07 20:01:00 +01:00
ailin-nemui
0d5e353ef1
Reword warning message
Include multiplexer name in TERM recommendation
2018-01-07 11:43:13 +01:00
ailin-nemui
e75ee2f74c
Merge pull request #746 from ailin-nemui/hide-lines
Add method to hide lines in a view
2018-01-07 11:23:22 +01:00
dequis
0aafd011c0 Add a startup warning if the TERM var is wrong inside tmux/screen
One of the most common and confusing issues we get in #irssi,
this should help identifying and mitigating it.
2018-01-06 18:04:01 -03:00
ailin-nemui
ded4e4d98d fix redraw 2018-01-06 01:05:35 +01:00
ailin-nemui
63d8e884dd fix some more 2018-01-06 00:26:48 +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
b332d448f7 fix comments 2017-11-30 11:15:47 +01:00
ailin-nemui
466d074200
Merge branch 'master' into hide-lines 2017-11-26 00:31:01 +01:00
ailin-nemui
3792bc9ba9
Merge pull request #762 from ailin-nemui/global-history
allow access to global command history when using a specifc history
2017-11-26 00:28:58 +01:00
ailin-nemui
02c677f467 use enum 2017-11-10 22:02:36 +01:00
ailin-nemui
b0fa4dd46d show initial nick and name on first start 2017-11-01 15:51:20 +01:00
ailin-nemui
deac66f33c add a key binding to erase history entries
it is possible to delete the current history entry using the
erase_history_entry key binding
2017-10-06 15:31:52 +02:00
ailin-nemui
1fd285dccf refactor history to use history_entries list
this allows access to the global history even when a using /window history
named or /set window_history on, and you want to recall something from one
of the other windows' histories.

usage (default): ctrl+up/down
2017-10-06 14:58:47 +02:00
ailin-nemui
8dfeca57ed hidden lines 2017-09-21 14:20:31 +02:00
ailin-nemui
0468c5d912 add new function to set the position in bytes
fixes #752
2017-09-15 13:47:01 +02:00
ailin-nemui
947682e5dd Revert "Merge pull request #452 from LemonBoy/terminfo-cup"
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.
2017-08-07 15:29:17 +02:00
ailin-nemui
1656dc1e54 Merge pull request #653 from ailin-nemui/regexex
Enable UTF8 in GRegex
2017-07-03 09:53:09 +02:00
ailin-nemui
1fc170ee11 Merge branch 'master' into regexex 2017-06-19 11:06:24 +02:00
dequis
4b1c60b2ec term-terminfo: Avoid switching out of alt screen on unexpected exits
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.
2017-06-17 13:47:13 -03:00
dequis
e498265328 Performance improvements for /lastlog -before
This avoids the use of g_list_find() to find if a match was already
added to the list of results, by checking the last two added matches
instead.

Checking just the last match isn't enough because a NULL match is added
as a separator (shown as -- in the UI)
2017-06-05 18:11:47 -03:00
dequis
0e44ea8916 Performance improvements for /lastlog with big result sets
This applies to "/lastlog" with no filters (or with filters that don't
filter a lot) and with large amounts of text in the scrollback.

Test case:

    /exec seq 1 500000
    /lastlog -file log.txt

Thanks to morning for reporting this.
2017-06-05 18:10:27 -03:00
ailin-nemui
4edfccfce7 get rid of new_text 2017-06-05 13:46:43 +02:00
ailin-nemui
79bbca4644 Refactor regex and implement UTF8 mode for GRegex
- with non-unicode byte to Private Use Area A mapping
- move all ifdefs to iregex.h file only
2017-06-04 00:52:53 +02:00
ailin-nemui
d61c54c32b do not reset true colour bit on colour reset
fixes #710
2017-05-27 00:12:54 +02:00
Stephen Oberholtzer
2b9be6e2ed Intentation/whitespace fixes
Change several instances of space-indentation to tabs, matching the
surrounding code.
2017-03-21 10:27:39 -04:00
Stephen Oberholtzer
70f9db3cbd Fix delay at startup when running against glib 2.49.3+
In glib v2.49.3, an optimization was made to eliminate certain
unnecessary wakeups.  (The specific change was made in
e4ee3079c5afc3c1c3d2415f20c3e8605728f074). Before this change, the
first call to g_main_iteration would always complete immediately.
In Irssi, this effectively reversed the order of the main loop, causing
the reload_config check and the dirty_check to run *before* the first
blocking call to g_main_iteration.

With the new logic, the first g_main_iteration call now blocks,
preventing the screen from being refreshed until the user starts typing
or a timer goes off.  (It also delays processing of SIGHUP, but I
expect that is not a common situation.)

This commit reorders the main loop to wait at the end of the loop,
rather than the beginning, addressing the problem.

(This closes Debian bug #856201.)
2017-03-21 09:37:23 -04:00
Nei
7ef22687f9 Merge branch 'd-minor' into 'master'
Prevent some potential null-pointer deferences.

See merge request !9
2017-03-04 20:35:17 +00:00
LemonBoy
98ead50b4e Prevent some potential null-pointer deferences.
Spotted by our friend scan-build.
2017-02-14 14:46:14 +01: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
Nei
7a112e0217 Merge branch 'master' into 'security'
Sync to master

See merge request !6
2017-01-03 13:30:39 +01:00
ailin-nemui
01163710e7 Merge pull request #585 from ailin-nemui/win_seq
g_sequence backing for window list
2017-01-03 12:45:50 +01:00
Ailin Nemui
f5cbbebc2e switch for gregex and regex.h 2017-01-03 12:29:11 +01:00
LemonBoy
5dcf291f21 Use the RAW flag when building the regexps.
Also, plugged a memory leak when retrieving the match position.
2017-01-02 17:50:14 +01:00
LemonBoy
5eaead761f Rebase against master. 2017-01-02 17:50:14 +01:00
LemonBoy
3fcd3cd2b9 Remove the regexp_compiled field.
It was made redundant by the introduction of the pointer to the GRegex
structure.
Silence the compiler warning in textbuffer.c about preg being
initialized by setting it to NULL.
2017-01-02 17:50:14 +01:00
LemonBoy
8e5db471e4 Use GLib's regexp interface (backed by PCRE) 2017-01-02 17:50:14 +01:00
ailin-nemui
07050e2a3c Merge pull request #587 from ailin-nemui/sbar_crash
add assertion to statusbar_read_group
2016-12-21 15:28:17 +01:00
Joseph Bisch
8007e9e61d
Fix oob read on invalid utf8 in term_addstr 2016-12-19 15:52:05 -05:00
ailin-nemui
17e42649bb reset background for mirc colour 99
fix #571
2016-12-15 17:06:40 +01:00
ailin-nemui
59242cb595 add assertion to statusbar_read_group
fix #564
2016-12-15 16:59:38 +01:00
ailin-nemui
365097319f manually redraw the activity list on expose only
might speed up /foreach query /unquery
2016-12-13 03:19:00 +01:00
Alexander Færøy
6a6196eebe
Kill bell_beeps.
Fixes #524
2016-10-23 21:24:12 +02:00
LemonBoy
251d8a686a Fix an OOB access in the cutbuffer implementation. 2016-08-24 22:29:52 +02:00
ailin-nemui
de11e0f4f2 remove broken dummy mode 2016-08-12 19:33:56 +02:00
ailin-nemui
9ee4803770 remove curses terminal and ncurses macro 2016-08-04 10:02:28 +02:00
ailin-nemui
c2c32e3955 check for NULL in statusbar_more_updated
fixes crash due to invalid access of active_win members when the more
indicator is triggered without an active window
2016-06-25 21:33:50 +02:00
LemonBoy
0060f682c2 Factor out some redundant code and remove hashtable_get_keys 2016-06-05 17:24:27 +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
Xavier G
5538578820 Move utf8.{h,c} from fe-common/core to core. 2016-05-13 01:26:33 +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
b9914abbf3 Make use of terminal application keys configurable
adds a new setting term_appkey_mode which can enable or disable the use
of keyboard transmit (application keys) mode. Fixes #430
2016-03-22 23:58:34 +01:00
ailin-nemui
b1ffd5f647 Merge pull request #452 from LemonBoy/terminfo-cup
Don't call terminfo_cont() twice on resume
2016-03-22 23:05:27 +01:00
ailin-nemui
29e160f0bf Merge pull request #457 from ailin-nemui/fix_450
fix race condition in terminal init
2016-03-22 22:57:28 +01:00
ailin-nemui
3bc8afa740 Merge pull request #458 from ailin-nemui/fix_449
Properly toggle bracketed paste mode on stop/cont
2016-03-22 22:54:43 +01:00
LemonBoy
897016131e Don't call terminfo_cont() twice on resume
Fixes some weirdness when using ^Z with zsh.
2016-03-22 22:50:24 +01:00
ailin-nemui
35d255fc8c Properly toggle bracketed paste mode on stop/cont
Fixes #449
2016-03-22 16:36:30 +01:00
ailin-nemui
938d0071c6 fix race condition in terminal init
remove the tcgetattr call to a single time on irssi load instead of
querying it each time. Fixes #450
2016-03-22 15:21:20 +01:00
ailin-nemui
117c890d98 cutbuffer: do not unconditionally use replace when noop was requested 2016-03-22 14:43:31 +01:00
Manish Goregaokar
ef0c7d3e7a Make pasting warning appear when long pastes are going to be split into many lines 2016-02-24 00:51:11 +05:30
Manish Goregaokar
9f0e5da208 use a #define'd LINE_SPLIT_LIMIT instead of hardcoding 400 2016-02-24 00:42:35 +05:30
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
ailin-nemui
dc03baa0d3 Merge pull request #353 from toddpratt/master
Allow for prepending to the cutbuffer in addition to replacing it.
2016-01-26 09:02:38 +01:00
ailin-nemui
ad842ea8a6 reorder history add and fixes 2016-01-08 15:42:59 +01:00
ailin-nemui
38720e0ecb Merge pull request #306 from dequis/bracketed-paste
Implement paste detection via the bracketed paste mode 2: bracket pasterer
2015-12-15 00:06:48 +01:00
dequis
ce77842a98 Bracketed paste: fix nitpick from ahf's review
Thanks ahf
2015-12-13 13:56:09 -03:00
dequis
e6fa311590 Bracketed paste: Adjust paste line count if there's text after newlines
With bracketed paste, "a\nb" will result in two lines being pasted,
because it's a single thing, with an end marker which the timeout based
pastes don't have.

Due to the way term_gets() counts lines, that input will have
paste_line_count == 1. This can be misleading.

This code adjusts it by looking at the last character, and increasing
the count if it finds anything that isn't a newline.
2015-12-12 01:49:32 -03:00
dequis
38d372eccb Disable timeout-based paste detection if paste_use_bracketed_mode is on 2015-12-12 01:19:36 -03:00
Todd A. Pratt
5d99a3d59a Merge branch 'master' of github.com:irssi/irssi 2015-12-09 20:48:21 -05:00
dequis
96766b7f05 Remove all WIN32 ifdefs (unifdef -UWIN32)
Just use cygwin.

This looks like it wasn't enough to do anything useful, and I don't
think anyone cares about supporting win32 the hard way.
2015-12-09 15:20:59 -03: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
LemonBoy
50fae4212e Use 'isblank()' instead of a custom macro 2015-11-22 21:33:44 +01:00
Fabian Kurz
011eda7d9e Correct a wrong use of the 'paste_buffer' variable
The function "static void paste_buffer_join_lines(GArray *buf)" in
"src/fe-text/gui-readline.c" is supposed to join lines from the GArray
pointed to by *buf under certain circumstances.

In the code of the function "buf" is actually used for getting the length
of the GArray, but to get a pointer to the data, "paste_buffer->data" is
used; paste_buffer is defined in the scope of the whole file.

This delivers the desired result, because this function is only called
once, with "paste_buffer" as the argument. If paste_buffer_join_lines()
will ever be used with a different argument, it will fail.
2015-11-22 21:24:05 +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
f90e10c5d2 remove more cruft from previous implementation 2015-11-13 14:01:25 -05:00
Todd A. Pratt
7768f3e520 remove cruft from previous implementation 2015-11-13 13:51:56 -05:00
Todd A. Pratt
1199ecc62f a facility for prepending or replacing the cutbuffer 2015-11-13 13:42:28 -05:00
dequis
8c98e07eab Merge remote-tracking branch 'origin/master' into bracketed-paste 2015-11-08 14:28:18 -03: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
ailin-nemui
50775e92e6 Merge pull request #330 from dequis/xterm-keypad-enter
Add xterm's keypad enter, meta-O-M to "key return" bindings
2015-11-02 00:15:58 +01:00
dx
8d1f667100 Merge pull request #320 from irssi/ahf/add-setting-type-any
Fix warnings
2015-11-01 13:40:54 -03:00
dequis
58a166484a Add xterm's keypad enter, meta-O-M to "key return" bindings
From the 'kent' terminfo entry. Also applies to putty.

Fixes #327
2015-10-06 06:15:47 -03:00
LemonBoy
0140e7c6b2 Fix the indentation. 2015-10-04 20:23:51 +02:00
Alexander Færøy
5f35fbc57a
Remove check for >= 0 for unsigned unichar. 2015-10-03 19:01:16 +02:00
LemonBoy
c7646dc58d Even simpler logic 2015-10-02 15:07:59 +02:00
LemonBoy
c351c448b8 Rework the logic to avoid allocating memory 2015-10-02 15:02:43 +02:00
LemonBoy
2e860abd2b Fix the display of utf8 sequences in the gui
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.
2015-10-02 14:44:35 +02:00
dequis
7866d2bcd6 Handle empty bracketed pastes (or sequences of those)
Both cases were off-by-one mistakes erring on the side of being too
conservative. This fixes these two harmless issues:

- For a single empty paste, it required another keystroke before
  processing it
- For a sequence of themcase, a single '~' was left in the input
2015-09-27 16:08:07 -03:00
dequis
c721d57688 Handle a paste start marker right after an end one (ignore both)
This actually workarounds a bug with the "st" terminal, for which i've
already submitted a patch, but irssi needs to be able to handle it
decently too.
2015-09-27 16:08:07 -03:00
dequis
7d062a313a Create paste_bracketed_middle() function to handle small pastes
"Small" as in ending in the same sig_input() call where they started
2015-09-27 16:08:07 -03:00
dequis
83f9772e21 Fix some minor style issues 2015-09-27 16:08:07 -03:00
dequis
79987d87f3 Send last line of bracketed paste together with the rest 2015-09-27 16:08:07 -03:00
dequis
3b01198f03 paste_bracketed_end: Fix rest length calculation 2015-09-27 16:08:07 -03:00
dequis
52729ca3da Save the part of the paste buffer after the bp_end marker for later
Also move relevant code to a paste_bracketed_end() function
2015-09-27 16:08:07 -03:00
dequis
9a6b2dedcc Improve bracketed paste start/end detection
- Use a keybinding to detect the start of a bracketed paste
- Iterate over the paste buffer looking for the end marker
2015-09-27 16:08:07 -03:00
LemonBoy
6888fc5fc7 Get rid of the non-portable memmem
The sequences we're after are found at the beginning or at the end of the
buffer, there's no need to scan the whole thing.
2015-09-27 16:08:06 -03:00
LemonBoy
4764b102ff Enable the bracketed paste mode on demand 2015-09-27 16:08:06 -03:00
LemonBoy
15dad291c7 Replace some hairy logic with g_array_remove_range
In the hope it'll do the same under the hood.
2015-09-27 16:08:06 -03:00
LemonBoy
f1eead7b4a Toggles 2015-09-27 16:08:06 -03:00
LemonBoy
72ac27e5a0 Implement the bracketed paste mode
As an alternative method of paste detection, more reliable but might not be
supported by all the VTs.
2015-09-27 16:08:06 -03:00
dequis
f39723f651 Fix FS#905, mangled text when pasted line length exceeds 400
http://bugs.irssi.org/index.php?do=details&task_id=905

Not using the patch from that ticket, the issue turned out to be that
(dest - last_lf_pos) returned number of unichr, not bytes, so that's 4
times less than what the size parameter of memmove() should be.
2015-09-21 17:53:46 -03:00
dx
9cf4dfd23d Merge pull request #288 from irssi/ahf/kill-gc
Remove Garbage Collection support.
2015-09-20 16:49:48 -03:00
Alexander Færøy
519955ebe4
Fix warning.
Add comment on the use of ??) in C, since that string isn't entirely
obvious to people who are reading the code.
2015-09-20 21:45:33 +02:00
Alexander Færøy
29cf546ee4
Remove Garbage Collection support.
GC support was never enabled by default and nobody in the current
development team seems to care about it.
2015-09-20 21:28:14 +02:00
LemonBoy
061fb34750 Modify the terminal initialization sequence
We disable the ICRNL flag to make Enter independent from ^J from the
keybinding point of view since the former will now send ^M, leaving the
user free to remap ^J without trapping itself into the irssi session
because of a broken Enter key.
Also disable the software flow control because we don't expect anyone to
run irssi over a serial console; we gain some more freedom by having ^Q
and ^S freely mappable by the user.
2015-09-19 12:22:58 +02:00
LemonBoy
b5b73cb471 Send smkx/rmkx sequence at terminal init
Enter the "application" mode when setting up the terminal, this improves the
compatiblity with the standards; as a side effect now DEL key works ootb when
irssi is run in the suckless's st terminal.
2015-09-06 15:47:08 +02:00
Alexander Færøy
eb0f09073c Merge pull request #199 from ailin-nemui/config-parser
Make config parser more robust
2015-04-17 21:23:03 +02:00
dequis
f14199d9c1 Change all strcmp() to g_strcmp0() to handle nulls gracefully
Just a string replacement (but i did check every one of them)

    sed -i 's/strcmp(/g_strcmp0(/g' **/*.c
2015-04-07 22:41:05 -03:00
Alexander Færøy
ac5aebb91f Merge pull request #217 from Lohhari/lastlog-date
Added a -date parameter to /lastlog to prepend each row with the ...
2015-03-01 11:44:28 +01:00
Ailin Nemui
ee3eaa5428 fix crash in layout code when encountering wrong config 2015-02-17 09:50:55 +01:00
Ailin Nemui
1e4f7e6324 Refuse to load broken configs on irssi start
By temporarily raising the fatal log level to critical during irssi
start-up, we make it fail when the config file is broken. This is then
re-set so that /reload of a broken config file will not crash irssi and
just report the errors and gracefully continue instead.
2015-02-17 09:50:55 +01:00
Ailin Nemui
96d4fb9156 add CONFIG_REC to config_node_section* APIs
this adds the CONFIG_REC * to the config_node_section and
config_node_section_index APIs as they will require access to the config
cache later on to make the config parser more robust.
2015-02-17 09:50:55 +01:00
Alexander Færøy
8e64aee42a Merge pull request #115 from ailin-nemui/fix-hat-key
Make ^ key and Ctrl+^ key usable with /BIND
2015-02-16 22:15:04 +01:00
Vesa Pirila
895ac10c4e lastlog.c is a mix of tab and space indentation. My changes now use tabs. 2015-02-16 09:49:22 +02:00
Vesa Pirila
cd5a571fd8 Added customization possibility for the lastlog date format, lastlog_date 2015-02-08 16:58:30 +02:00
Vesa Pirila
466166010b Added a -date parameter to /lastlog to prepend each row with the row's date 2015-02-08 13:00:51 +02:00
dequis
367d8efc5f Fix blinking/bold text in terminals with no color support
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.
2014-12-14 18:21:40 -03:00
Ailin Nemui
b03805eeb9 reimplement format and length logic for the entry prompt 2014-11-10 10:53:14 +01:00
Veres Lajos
f285332c5b typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-08 22:26:53 +00: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
9f6c76b028 Add the signal for printtext_after that was missed in the original commit.
Now properly sends "gui print text after finished" signal when using
the printtext_after API that was fixed after 0.8.16
2014-08-25 14:50:41 +02:00
Alexander Færøy
d40c0704f0 Merge pull request #123 from ailin-nemui/terminfo-scroll-check-bounds
Add bounds check to array access in terminfo driver.
2014-08-09 12:24:45 +02:00
Ailin Nemui
836d386823 Add bounds check to array access in terminfo driver.
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.
2014-08-09 11:40:37 +02:00
tomaw
2346d3b62f Merge pull request #109 from cpbills/master
Fix right aligned statusbar item redrawing
2014-08-08 18:57:50 +01:00
Ailin Nemui
b602372e78 fix mirc_blink_fix
the background colours were totally off with mirc_blink_fix
enabled. oops.

reported by wodim
2014-07-31 03:09:19 +02:00
Ailin Nemui
09f23d06b5 Modify escape of ^ key so it can be used as well as Ctrl+^
Fixes FS#721

This makes Ctrl+^ and ^ bindable again as different keys. We do this
by escaping single `^` as `^-`, which is not a valid control character
(unlike `^^`)

The original approach suggested in FS#721 is insufficient, it will
break bindings such as `meta-^` because Irssi is convinced that `^`
introduces a Control-key ("key combo") so it is waiting for what may
follow.
2014-07-28 13:58:13 +02:00
Ailin Nemui
1cf7017ac9 fix colour 0 again
the previous commit was broken, as it conflicted with the colour
\#000000. Now both the "real colour black" and the "terminal colour 0"
are working.
2014-07-24 00:11:42 +02:00
Ailin Nemui
41fab0707f restore the colour 0 ("black") that got broken by extended colours
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
2014-07-23 23:42:05 +02:00
Christopher P. Bills
6a5f04b26a Fix right aligned statusbar item redrawing
Fixes Github issue #97 https://github.com/irssi/irssi/issues/97

Fix proposed by ailin-nemui, built and tested on Debian Jessie using
0.8.15 source, tested by GeertHauwaerts as well.
2014-07-22 22:03:46 -04:00
Ailin Nemui
8e062b7bd0 fix uninitialised copy on 24bit colours 2014-07-18 13:56:02 +02:00
David Leadbeater
7fe47826ea Suggest /HELP rather than HELP
At this point cmdchars is definitely / and the user might not know they
need to add / to a command.
2014-07-08 09:24:12 +01:00
David Leadbeater
4e2299f1b7 Change to printtext for first time message too 2014-07-08 09:23:55 +01:00
David Leadbeater
47d66d214f Only show banner if not connecting to servers
It's tricky to make the banner show first in all cases and it's unlikely
to be seen if someone is connecting to a server already, so just don't
show it.
2014-07-08 01:38:08 +01:00
Lukas Mai
0e294d5c2e add italics support; don't use standout for reverse 2014-07-07 00:32:07 +02:00
Geert Hauwaerts
2ff5f5b7e5 Fixed a compiler warning for statusbar_redraw
Fixed a compiler warning for statusbar_redraw.
2014-07-06 23:27:55 +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
Geert Hauwaerts
8c1e7d9c17 Updated the startup banner + added generic banner
I updated the banner displayed when you start Irssi for the first time
and I have added a banner that will be displayed everytime you start
Irssi.
2014-07-06 22:23:17 +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
Alexander Færøy
2e6f16c0fa Merge pull request #11 from ailin-nemui/print_text_after_time-api
add print_text_after_time to specify time stamp for lines
2014-06-30 00:07:14 +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
Dave Reisner
f0925de16b s/INCLUDES/AM_CPPFLAGS/g
Silences warnings on recent automake such as:

src/core/Makefile.am:3: warning: 'INCLUDES' is the old name for
'AM_CPPFLAGS' (or '*_CPPFLAGS')
2014-06-27 09:06:21 -04:00
Kuang-che Wu
fc4a4d2471 Fix UTF-8 character corruption every 32kb of text buffer 2014-06-18 22:47:17 +02:00
David Hill
9e47f34c3f g_strcasecmp -> g_ascii_strcasecmp 2014-06-15 16:20:58 -04:00
Ailin Nemui
9ee8e66431 fix print_after scrollback 2014-06-11 11:00:26 +02:00
Emanuele Giaquinta
02aa2682dc Fix crash in mainwindows_resize_smaller when the 'mainwindows' list is empty.
The crash can happen if the terminal height decreases before the first window
is created. Based on a patch by Jaroslav Škarvada (red hat bug #796457).


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5217 dbcabf3a-b0e7-0310-adc4-f8d773084564
2012-06-24 14:33:54 +00:00
Alexander Færøy
ada26a8d21 Add missing includes to shut the compiler up.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5139 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-04-04 12:07:26 +00:00
Alexander Færøy
8728207191 deprecated glib strup/down fixes from exg.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5138 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-04-03 20:09:37 +00:00
Alexander Færøy
3eea03ccb8 Irssi now detects a paste if it reads at least three bytes in a single read;
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
2010-02-27 14:57:16 +00:00
Jilles Tjoelker
38306ad488 Allow ctrl+home/ctrl+end to go to the beginning/end of scrollback.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5075 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-05-22 12:48:02 +00:00
Jilles Tjoelker
afdb462c59 Remove unused variables.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5032 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-03-01 00:22:29 +00:00
Jilles Tjoelker
d979a991c8 Check for SIGCONT using a custom GSource instead of every 0.5 second.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5022 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-27 14:20:35 +00:00
Jilles Tjoelker
cb1f07352a Reject invalid level specifications in /set.
Most of these have names that end in "_level".


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5021 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-21 21:17:51 +00:00
Alexander Færøy
c561ba35e6 Code Cleanup:
Use g_string_append_printf() instead of g_string_sprintfa() (which is considered deprecated.)


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5003 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-08 17:22:42 +00: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
2f06196ffb Fix last change.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4983 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-01-13 18:51:25 +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
edc7dc26fe Remove memory chunks in favour of memory slices.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4978 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-01-08 12:39:11 +00:00
Emanuele Giaquinta
5b76b1585f Remove useless code, cur_line is always the last line of the textbuffer.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4976 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-01-04 15:56:54 +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
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
48d0135d3e Make some functions static.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4956 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-08 17:11:00 +00:00
Emanuele Giaquinta
770c906a1c Simplify.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4954 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-08 16:32:56 +00:00
Emanuele Giaquinta
43bed5bb09 Simplify and remove dead code.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4949 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-07 15:49:04 +00:00
Emanuele Giaquinta
04a028d8c9 Simplify and remove dead code, MAIN_WINDOW_TEXT_HEIGHT(rec) >= WINDOW_MIN_SIZE
always holds.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4948 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-06 17:02:27 +00:00
Emanuele Giaquinta
fe9b63ef65 Always preserve the active mainwindow in mainwindows_resize_smaller,
prompted by report by Henri Kemppainen.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4947 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-06 12:36:41 +00:00
Emanuele Giaquinta
a644a200c1 Fix leak introduced in r1855.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4946 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-06 12:29:51 +00:00
Emanuele Giaquinta
14b9462ae4 Factor computation of fg/bg.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4943 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-05 13:55: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
3f9148d0e3 Add function to set minimum/maximum size for a statusbar item.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4936 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-01 18:18:59 +00:00
Emanuele Giaquinta
545b0d5de8 Add public header with interfaces to manage statusbar items, bug #535.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4935 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-01 18:12:52 +00:00
Emanuele Giaquinta
227e90e52b Simplify statusbar_item_default_handler by merging update_statusbar_bg and
reverse_controls and by using a GString.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4934 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-30 23:14:43 +00:00