summaryrefslogtreecommitdiff
path: root/src/gui/curses
AgeCommit message (Collapse)Author
2023-07-08core: use type "enum" in optionsSébastien Helleu
2023-07-03core: fix stylesSébastien Helleu
2023-07-03core: don't send key_pressed signal again for the same key pressTrygve Aaberge
If you press an incomplete key sequence, previously WeeChat would send the key_pressed signal again for the same keys on the next key. E.g. if you press escape and then 1, previously you would get the key_pressed signal with signal_data `\x01[` when you pressed escape, and then key_pressed with `\x01[` again when you pressed 1 (plus key_pressed with `1` for the 1 key). So two signals for the escape key, even though it was only pressed once. With this patch, you only get one signal for each key press. So one with `\x01[` when you press escape and then one with `1` when you press 1.
2023-06-26core: display actual key name and command with key Alt+kSébastien Helleu
Key Alt+K (upper K) is removed as well as commands `/input grab_raw_key` and `/input grab_raw_key_command`.
2023-06-02core: fix weechat.look.align_multiline_words not workingTrygve Aaberge
This option was broken with commit 031bd45e3.
2023-05-29core: set word_end_offset to character after wordTrygve Aaberge
It seemed strange to me to have word_end_offset point to the last character in the word, rather than the character after the word, especially now with the word stopping before a newline character which meant word_end_offset would be -1 if there was no characters before the newline character.
2023-05-29core: fix chat colors at certain positions not being appliedTrygve Aaberge
The new rendering of multiline lines had some issues with colors at certain positions not being applied. The color would not be applied if the color code was at either of these positions: - At the start of a line after a newline character - At the end of a line after a space and before a newline character - At a line by itself before a newline character The way I had done it by considering newline characters as a word in gui_chat_get_word_info with a variable specifying that it's newline characters became messy and didn't really make sense, so rather than doing this, I changed gui_chat_get_word_info to stop before the first newline character. That way, we can just check if we are at a newline character at the start of the loop, and don't need any more special handling. Fixes #1928
2023-05-13core: add quotes around paths in CMake files (closes #29)Sébastien Helleu
2023-05-01core: add options weechat.color.chat_status_disabled and ↵Sébastien Helleu
weechat.color.chat_status_enabled (issue #1820)
2023-04-26core: always allow 256 colors, find nearest color if less colors are ↵Sébastien Helleu
available in terminal (issue #1920)
2023-04-26core: fix infinite loop on startup when running some gui commands before the ↵Sébastien Helleu
switch to core buffer is performed (closes #1917)
2023-04-26core: fix display bug when drawing partially scrolled multilineTrygve Aaberge
If you have a chat line with multiple lines that were scrolled so that part of it is rendered at the bottom of the chat area, and part of it falls below the chat area, there was a bug where the prefix_suffix would be displayed at the end of the last line. Looks like this happens because the gui_chat_display_prefix_suffix is called for the line below the last line displayed in the chat area. So we have to add a check for this so we don't add the prefix_suffix. This check is copied from gui_chat_display_word which checks for the same. Fixes #1912
2023-04-25core: add cursor key l to quote focused lineTrygve Aaberge
Fixes #1913
2023-04-23core: fix update of terminal title in some terminals like suckless terminal ↵Sébastien Helleu
(stterm) (closes #1882)
2023-04-19core: render newline characters in chat line messagesTrygve Aaberge
If a chat line message contains a newline character (\n) it was previously rendered as J with reverse video. This commit makes it render as an actual newline instead, so messages with multiple lines become supported. The rendering is fixed in normal mode as well as bare mode both when scrolled to the bottom and when scrolled up (which is different code paths). Focus events has also been updated to support this (except for _chat_line_y which returns -1 for all lines, but the docs says this variable is only for buffers with free content). Currently, the only way to include a \n in a chat line message is with hdata_update because printf splits on \n and creates multiple separate lines, but hopefully either printf can be changed to not split on \n, or a new command which doesn't split can be added.
2023-03-26core: add keys `shift-left` and `shift-right` with same commands as `left` ↵Sébastien Helleu
and `right` (issue #1503)
2023-03-26core: revert keys `meta-r` (delete line) and `meta-R` (delete input) (issue ↵Sébastien Helleu
#1503)
2023-03-26core: Implement commands for operating on a single input lineTrygve Aaberge
This changes the commands delete_beginning_of_line, delete_end_of_line, delete_line, move_beginning_of_line and move_end_of_line to operate on the current line instead of the whole input. The commands delete_beginning_of_input, delete_end_of_input, delete_input, move_beginning_of_input and move_end_of_input are added with the previous implementations that the line commands had. Additionally, the commands move_previous_line and move_next_line are added which moves the cursor to the previous/next line and keeps the horizontal position in the line. The meta-r key is changed from delete_line to delete_input to keep the behavior, and because you probably want to delete the whole input more often than the line. The meta-R key is added for delete_line. The home, end, ctrl-u and ctrl-k keys are kept to the same commands, which means that they change behaviour. This is because having them operate on the line is consistent with other applications (vim, zsh), and I also think it's more practical. These new bindings are added: shift-home: /input move_beginning_of_input shift-end: /input move_end_of_input shift-up: /input move_previous_line shift-down: /input move_next_line meta-R: /input delete_line meta-ctrl-u: /input delete_beginning_of_input meta-ctrl-k: /input delete_end_of_input Relates to #1498
2023-03-25core: fix typo and code styleSébastien Helleu
2023-03-25core: Replace newline/tabs after paste is acceptedTrygve Aaberge
Instead of replacing newline/tabs when paste is started, do it when the paste is accepted instead. This makes a difference if you paste again while the paste confirmation is active, where instead of running it again for each paste, it will now be run for all the text at the end. For now this doesn't make a practical difference, but the next commit will remove the final newline when multiple lines are pasted too, which we only want to do for the final paste.
2023-03-25core: When pasting, insert text in input instead of interpreting keysTrygve Aaberge
This makes pasted text appear in the input bar, instead of each line being sent. This allows you to edit the text before sending it, and it makes multiline paste supported in buffers with input_multiline on. It also replaces \r with \n in pasted text because most terminals (e.g. xterm and urxvt) print lines separated by \r when pasting as if return was pressed between each line, even though the copied text uses \n. The text sent to the buffer should use \n, not \r, so we have to replace it. Note that this only works when bracketed paste is enabled or the paste confirmation as shown, because non-bracketed paste with no paste confirmation is not detected as a paste. Fixes a part of #1498
2023-03-25core: Parse bracketed paste also when paste pendingTrygve Aaberge
When in paste pending mode, the bracketed paste escape sequence should still be interpreted, so that if you paste while in paste pending the same things as when pasting in normal mode still happens, i.e. the escape sequence is removed, ctrl-y/n is not interpreted and newline/tabs are replaced.
2023-03-17core: also display mouse codes with `/debug key`Sébastien Helleu
2023-03-17core: change order of modifiers in mouse keysSébastien Helleu
Now the modifiers for mouse keys are in the same order as other keys: `alt-` then `ctrl-`.
2023-03-17core: split gui-curses.h into multiple headersSébastien Helleu
2023-03-17core: set insert_ok to 0 for backspace keySébastien Helleu
2023-03-16core: create config options for all keys that can be managed with `/set` and ↵Sébastien Helleu
`/fset` commands
2023-03-16core: add key alt-K (alt+shift+k) to grab raw key and its commandSébastien Helleu
2023-03-16core: use new key name in command `/key` and configuration fileSébastien Helleu
Legacy keys are automatically converted to new names when loading configuration file `weechat.conf`. Examples: "ctrl-I" => "tab" "meta2-1;3A" => "meta-up" "meta2-Z" => "shift-tab" "meta-wmeta-meta2-A" => "meta-w,meta-up" "ctrl-Cb" => "ctrl-c,b"
2023-02-02core: remove extra spaces before commaSébastien Helleu
2023-01-29core: force ctrl keys to lower case when they are added (closes #1875)Sébastien Helleu
2023-01-29core: ensure internal_code is not NULL when adding a default key (issue #1875)Sébastien Helleu
2023-01-28core, plugins: replace calls to string_str(n)cmp by str(n)cmp (issue #1872)Sébastien Helleu
2023-01-28core, plugins: check that string parameters are not NULL in search functions ↵Sébastien Helleu
(issue #1872)
2023-01-28core: make color names and attributes case sensitive (issue #1872)Sébastien Helleu
2023-01-28core, plugins: make input actions in buffers case sensitive (issue #1872)Sébastien Helleu
2023-01-08core: remove build with autotoolsSébastien Helleu
CMake is now the only way to build WeeChat.
2023-01-01core: update copyright datesSébastien Helleu
2022-12-31core: move function gui_input_move_to_buffer to gui-buffer.cSébastien Helleu
2022-12-29core: add option weechat.look.chat_space_right (issue #1862)Sébastien Helleu
2022-12-25core: move `/input` buffer switch/zoom actions to command `/buffer`Sébastien Helleu
Actions moved: * `/input switch_active_buffer` -> `/buffer switch` * `/input switch_active_buffer_previous` -> `/buffer switch -previous` * `/input zoom_merged_buffer` -> `/buffer zoom`
2022-12-25core: move `/input` set_unread actions to commands `/allbuf` and `/buffer set`Sébastien Helleu
Actions moved: * `/input set_unread` -> `/allbuf /buffer set unread` * `/input set_unread_current_buffer` -> `/buffer set unread`
2022-12-25core: move `/input` hotlist actions to new command `/hotlist`Sébastien Helleu
Actions moved to command `/hotlist`: * `/input hotlist_clear` -> `/hotlist clear` * `/input hotlist_remove_buffer` -> `/hotlist remove` * `/input hotlist_restore_buffer` -> `/hotlist restore` * `/input hotlist_restore_all` -> `/hotlist restore -all`
2022-12-25core: move `/input` jump actions to command `/buffer jump`Sébastien Helleu
Actions moved to command `/buffer jump`: * `/input jump_smart` -> `/buffer jump smart` * `/input jump_previously_visited_buffer` -> `/buffer jump prev_visited` * `/input jump_next_visited_buffer` -> `/buffer jump next_visited` * `/input jump_last_buffer_displayed` -> `/buffer jump last_displayed`
2022-12-19core: return directly output of string_dyn_free without temporary variableSébastien Helleu
2022-12-18core: remove unused argument "pos" from function gui_input_insert_string, ↵Sébastien Helleu
add tests on function
2022-12-10core: add color attributes "blink" and "dim" (half bright) (closes #1855)Sébastien Helleu
2022-12-10core: do not display non printable chars, fix function utf8_char_size_screenSébastien Helleu
Now the function utf8_char_size_screen can return -1 when the char is not printable. It has a specific behavior for some chars: - U+0009: value of option weechat.look.tab_width - U+0001 to U+001F (except U+0009): 1 - U+00AD (soft hyphen): -1 - U+200B (zero width space): -1
2022-12-10core: display chars < 32 with a letter/symbol and reverse video attribute in ↵Sébastien Helleu
chat
2022-12-10core: toggle reverse video attribute in bars for chars < 32 only if not ↵Sébastien Helleu
already enabled