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

191 Commits

Author SHA1 Message Date
ailin-nemui
7e6e1f2e10 Use full paths to includes 2019-05-01 22:08:45 +02:00
ailin-nemui
c1fb9a8402 fix paste_join_multiline 2018-11-09 11:06:13 +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
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
0468c5d912 add new function to set the position in bytes
fixes #752
2017-09-15 13:47:01 +02:00
Alexander Færøy
6a6196eebe
Kill bell_beeps.
Fixes #524
2016-10-23 21:24:12 +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
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
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
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
f90e10c5d2 remove more cruft from previous implementation 2015-11-13 14:01:25 -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
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
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
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
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
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
Emanuele Giaquinta
ba002bbc13 Revert r4912.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4916 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-18 09:21:36 +00:00
Emanuele Giaquinta
ca5f4ec1f9 Simplify sending of the first pasted line.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4912 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-16 09:19:27 +00:00
Emanuele Giaquinta
7b529aa530 Remove get_utf8_char/utf16_char_to_utf8 in favour of glib
g_utf8_get_char_validated/g_unichar_to_utf8.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4893 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-10 11:59:31 +00:00