Paul Fertser
1e81eea899
Input window: handle invalid multibyte
...
The current code enters an infinite loop if the input string happens
to get an invalid utf-8 sequence somehow. For me it was reproducible
by running profanity in a Screen session and pressing Alt-т (cyrillic
letter).
Fix it the way borrowed from 0501e49623
where mbrlen is used for the same purposes.
2022-03-29 13:57:07 +03:00
MarcoPolo-PasTonMolo
06ef6842e8
Add quote autocompletion for previous messages
...
Fixes https://github.com/profanity-im/profanity/issues/1649
Type `>` then press tab or shift tab to autocomplete previous messages,
then type your reply and send message.
Newlines are replaced with newline followed by `> `.
A newline is added at the end so that the user can immediately type a
message without manually adding a new line.
2022-03-21 13:46:50 +02:00
Michael Vetter
963065775b
Merge pull request #1646 from MarcoPolo-PasTonMolo/fix/nick-autocomplete
...
Fix not autocompleting nicks with '/'
2022-03-21 10:06:29 +01:00
MarcoPolo-PasTonMolo
ffeb8c33f1
Reverse priority for nick vs cmd autocomplete
2022-03-21 00:12:12 +02:00
Steffen Jaeckel
07e584734d
Alt+e is already bound, use Alt+c
...
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-13 13:21:40 +01:00
MarcoPolo-PasTonMolo
3f78af2591
Move get_message_from_editor to appropriate file and change its keybinding
2022-03-03 12:56:03 +01:00
MarcoPolo-PasTonMolo
0fdaad7cbf
Add hotkey for sending readline text to editor
2022-03-03 12:55:57 +01:00
MarcoPolo-PasTonMolo
1afe2aad24
Fix not autocompleting nicks with '/'
...
Remove check for '/' at the beginning of the line before autocompleting
and make it fallback to command autocompletion if no nicks found.
Fixes https://github.com/profanity-im/profanity/issues/1474
2022-03-03 09:59:21 +02:00
Michael Vetter
f21595597f
Format code correctly
2021-10-05 10:01:27 +02:00
Michael Vetter
c397657061
Change attentionflag shortcut to alt+v
...
alt+f is the default readline shortcut for forward one word.
Regards https://github.com/profanity-im/profanity/issues/1580
2021-08-31 22:25:29 +02:00
DebXWoody
b0a89db1d6
Attention flag message ( enabled, disabled)
...
When the user enables or disabled the attention flag, a message will be
displayed in the chat window.
2021-05-29 20:44:17 +02:00
DebXWoody
1526a00123
Attention flag - Implemented Alt+m
2021-05-29 20:16:21 +02:00
DebXWoody
6dd11f0fff
Attention flag for groupchats
...
Attention flag for groupchat and display the windows via "/wins attention"
2021-05-29 09:30:13 +02:00
DebXWoody
3520645366
Attention flag for chat windows
...
User is able to toggle a flag for chat windows. This flag should be used to mark
the window for "Attention".
Use Ctrl+f to mark the window.
2021-05-29 08:05:03 +02:00
kaffeekanne
97dd1cb0c2
Set input window size to max window size
...
Input window size was one cell off, therefore terminal themes with background color set were rendered incorrectly, fixes #1458
2020-12-11 20:33:01 +01:00
Philipp Klaus Krause
6a276e74e3
Since the string from strerror should never be modified, use const.
2020-10-14 09:52:26 +02:00
nia
ce67753423
Avoid passing NULL pointers to curses functions.
...
This allows profanity to work without segfaulting from NULL
pointer dereferences when used with NetBSD libcurses.
Basic functionality was tested, there may be more NULL pointer
issues hiding.
2020-09-04 12:59:20 +02:00
nia
52e9be4abc
Basic support for building on NetBSD.
...
- Add NetBSD as a recognized platform without -ldl.
- Allow building with NetBSD libcurses instead of ncurses.
- Portability to NetBSD sh - use POSIX '=' instead of '=='.
2020-09-04 12:55:20 +02:00
Michael Vetter
a2726b6a7d
Apply coding style
2020-07-07 14:18:57 +02:00
Michael Vetter
a4cadf78fa
Revert "Apply coding style"
...
This reverts commit 9b55f2dec0
.
Sorting the includes creates some problems.
2020-07-07 13:53:30 +02:00
Michael Vetter
9b55f2dec0
Apply coding style
...
Regards https://github.com/profanity-im/profanity/issues/1396
2020-07-07 09:43:28 +02:00
Michael Vetter
74e061165a
Define POSIX macro to have strdup
...
98c38dc6d6
sets C99 as standard.
strdup() is not part of C99.
For now set `-D_POSIX_C_SOURCE=200809L` macro to have strdup() in C99.
Using `gnu99` instead would be another option.
We should take more care to use glib functions whenever possible.
Regards https://github.com/profanity-im/profanity/issues/1357
2020-06-12 16:12:21 +02:00
Michael Vetter
813fd637a1
inp_readline() Correct slashguard feature
...
Protect against invalid reads by checking the length.
2020-04-21 16:47:18 +02:00
Dmitry Podgorny
1f0159de36
Make _inp_edited() more robust
2020-04-19 00:19:16 +03:00
Michael Vetter
3c56b289ed
Add slashguard feature
...
New command `/slashguard` tries to protect against typing ` /quit` by
not allowing a slash in the first 4 characters.
2020-03-18 18:20:05 +01:00
Michael Vetter
46fd7150e5
Add vim modeline
2019-11-13 12:11:05 +01:00
Michael Vetter
ba0f925222
Fix add_history usage in down arrow handler
...
[Programming with GNU
History](http://www.math.utah.edu/docs/info/hist_2.html ) mentions
using_history().
Chet, maintainer of readline told me about it. (Thanks Chet!)
Seems like we need to call this so that the history offset is at the
right end of the list. I assume it's called in the linehandler
automatically.
Fix https://github.com/profanity-im/profanity/issues/200
2019-11-05 17:19:51 +01:00
Michael Vetter
330ef3bcf3
Store current input line in history
...
Regards https://github.com/profanity-im/profanity/issues/200
This doesn't work yet. And I have no idea why.
Weird behaviour:
- start profanity
- type 'ASDF'
- ctrl+arrow down
-> text vanishes (like intended)
- arrow up
-> nothing happens (intended is that the last history item [ASDF]
appears)
- type 'ABC'
- press enter
- arrow up
-> ABC appears
- enter
- type 'UUU'
- ctrl+arrow down
- type 'ZZZ'
- enter
- arrow up
- ZZZ appears
- arrow up
- UUU appears
So in the latter case we added to history and deleted from the input
line and then immediately entered new text and pressed enter, to add
this to the history too.
When we do this the not sent text succesfully was stored in history.
2019-11-05 17:18:42 +01:00
Michael Vetter
e8420e7235
Bind key to switch to next active window
...
alt-a brings one to the next window with unread messages.
Regards https://github.com/profanity-im/profanity/issues/1114
2019-09-30 18:28:05 +02:00
Michael Vetter
d6c638c70f
Define keybindings to switch to up to 20 windows
...
alt-2 brings one ot the window.
irssi supports alt + 1234567890qwertyuio to easily switch to 20 windows
instead of just ten.
Hardcode this too.
Regards https://github.com/profanity-im/profanity/issues/1114
2019-09-30 17:42:32 +02:00
Michael Vetter
706af9a900
Update copyright to include 2019
2019-01-22 11:31:45 +01:00
twardziejszy
ca29638f2c
Add prof_win_close ( #1017 )
2019-01-10 12:44:52 +01:00
James Booth
95b639a21f
WIP add self prefs for statusbar
2018-03-10 22:16:52 +00:00
James Booth
ad76495267
Clear autocompletes on line edits
2018-02-09 22:48:55 +00:00
James Booth
250e972b7a
Update copyright
2018-01-21 15:00:02 +00:00
James Booth
6b830277a6
Allow previous autocompletion with shift tab
2017-04-01 00:27:11 +01:00
James Booth
68a3daedb9
Update Copyright
2017-01-28 17:24:22 +00:00
James Booth
d3cc5bd7ed
Allow vertical positioning of all windows
2016-09-23 00:56:53 +01:00
James Booth
0aa758cbfb
Add /inputwin top|bottom command
...
closes #853
2016-09-19 23:40:45 +01:00
James Booth
a3a73cf003
Move all filepath handling to files.c
2016-07-24 21:49:35 +01:00
James Booth
29452f8f1b
Move xgd functions
2016-07-24 17:12:09 +01:00
James Booth
0a57c4de78
Tidy headers
2016-07-24 15:43:51 +01:00
James Booth
90b9b48ab9
Moved roster_list.c
2016-07-24 15:08:47 +01:00
James Booth
2af0d38e3d
Moved muc.c
2016-07-24 15:02:43 +01:00
James Booth
310abd401d
Moved chat_state.c
2016-07-24 14:28:25 +01:00
James Booth
8d8f2f290d
Moved chat state handling code to chat_state.c
2016-07-24 13:56:11 +01:00
James Booth
e8fc80f5c1
Update GPL link in headers
2016-07-24 01:14:49 +01:00
James Booth
fb34785566
Rename command sources
2016-05-22 23:59:52 +01:00
James Booth
eaf2901b01
Add cmd_autocomplete.c
2016-05-20 00:19:03 +01:00
James Booth
cf8452d95f
Reorder headers in inputwin.c
...
Fixes unknown type name '_fpos64_t' error on Cygwin
2016-05-11 22:50:19 +01:00