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

795 Commits

Author SHA1 Message Date
ailin-nemui
6c6c42e3d1 Merge branch 'security' into 'master'
See merge request !7
2017-01-03 13:53:40 +01:00
ailin-nemui
6c0c0c60ad 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-23 00:08:36 +01:00
ailin-nemui
6572005d3d Merge pull request #458 from ailin-nemui/fix_449
Properly toggle bracketed paste mode on stop/cont
2016-03-23 00:08:36 +01:00
ailin-nemui
5ef2b958d9 Merge pull request #457 from ailin-nemui/fix_450
fix race condition in terminal init
2016-03-23 00:08:36 +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
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
dequis
8c98e07eab Merge remote-tracking branch 'origin/master' into bracketed-paste 2015-11-08 14:28:18 -03: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