Michael Vetter
f21595597f
Format code correctly
2021-10-05 10:01:27 +02:00
Michael Vetter
1ec606540e
Get rid of asprintf and _GNU_SOURCE define
...
_GNU_SOURCE was even in some files where it was not needed at all
(http*).
Let's replace asprintf() with g_strdup_printf().
2021-03-30 17:38:13 +02:00
Michael Vetter
057c9ad776
Add config.h in files were it was missing
...
Related to https://github.com/profanity-im/profanity/issues/1512
2021-03-26 19:54:22 +01:00
Michael Vetter
638a50f8d1
autocomplete: remove duplicate code in search functions
...
_search_next and _search_prev where exactly the same except taking the
nex/prev from the list.
Use one function with a direction argument.
2021-03-11 22:24:27 +01:00
Michael Vetter
e3133ed98f
autocomplete: Use asprintf don't calculate length twice
...
Through asprintf() we can get rid of malloc() + sprintf().
Also we don't need to calculate the strlen() again since asprintf()
returns the bytes printes.
Only non UTF-8 characters. But that was true before already.
2021-03-11 22:24:02 +01:00
Michael Vetter
c1ccaee58f
Remove duplicate code in autocomplete_param*
...
autocomplete_param_with_func and -autocomplete_param_with_ac had lots of
duplicate code.
2021-03-11 22:08:04 +01:00
Michael Vetter
35aecd425f
Declare counter var inside loop
...
We require c99/gnu99 anyways.
2020-11-09 11:33:33 +01: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
de91a99178
Fix memleak in autocomplete_remove_older_than_max*
2020-05-29 11:28:58 +02:00
Michael Vetter
bfaf737efa
urlopen: get last URL first
...
Fix https://github.com/profanity-im/profanity/issues/1348
2020-05-29 11:26:18 +02:00
Michael Vetter
aef74f90ec
Only save max 20 urls
2020-05-20 10:54:58 +02:00
Paul Fariello
a52e3ea1d8
Add context to autocomplete_with_func and use it for omemo trust command
...
Fix #1068
2020-01-31 10:07:08 +01:00
Michael Vetter
46fd7150e5
Add vim modeline
2019-11-13 12:11:05 +01:00
Michael Vetter
9b3517c21e
Free strings in autocomplete_param_no_with_func
...
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 19:05:27 +02:00
William Wennerström
0c10a699f2
Always check for directory changes with sendfile auto completion
...
Instead of only checking for files when 'last_directory' has changed, do
it every time.
Add autocomplete_update function that updates the items while retaining
last_found and search_str.
Fixes #1099
2019-07-20 10:38:22 +02:00
Michael Vetter
706af9a900
Update copyright to include 2019
2019-01-22 11:31:45 +01: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
131c98b305
Add missing header
2017-03-25 01:48:40 +00:00
James Booth
b5e0106526
Autocomplete accent and case insensitive
2017-03-25 01:40:20 +00:00
James Booth
68a3daedb9
Update Copyright
2017-01-28 17:24:22 +00:00
James Booth
e8fc80f5c1
Update GPL link in headers
2016-07-24 01:14:49 +01:00
James Booth
71178b3696
Store plugin completers by plugin name
2016-07-05 21:46:36 +01:00
James Booth
f377e0329e
Allow autocomplete for basic compelters when no input
2016-05-24 00:32:53 +01:00
James Booth
e53e94f1e2
Updated copyright
2016-02-14 22:54:46 +00:00
James Booth
0017098400
Applied coding style to src/tools/
2015-10-25 22:47:42 +00:00
James Booth
b3be26a214
Updated copyright
2015-02-10 23:16:09 +00:00
James Booth
4c6cfcdca0
Simplified autocompleters and command history
2015-01-16 22:50:40 +00:00
James Booth
a4f7932ed7
Check for NULL inside autocomplete_free
2014-09-26 00:48:48 +01:00
James Booth
0b2a1a1bc7
Renamed autocomplete function to get list
2014-09-26 00:06:50 +01:00
James Booth
a905ce18a3
Added autocompletion for jid-multi form fields
2014-09-17 23:36:10 +01:00
James Booth
45ba6f1fed
Added autocompletion for form text-multi values
2014-09-17 23:35:51 +01:00
James Booth
b934ad54d5
Added form tests
2014-09-14 22:31:27 +01:00
James Booth
f9737251a6
Added license exemption for OpenSSL to source headers
2014-08-24 20:57:39 +01:00
James Booth
cc62fe376c
Finished chat room nick autocomplete
2014-07-15 21:30:23 +01:00
James Booth
2f3234a5f5
Added quote param to autocomplete_param_with_ac
2014-07-09 20:32:28 +01:00
James Booth
954661e59e
Added quote param to autocomplete_complete
2014-07-09 20:23:47 +01:00
James Booth
0c9851106b
Added quote param to autocomplete searches
2014-07-09 20:15:20 +01:00
James Booth
b9b5d6a5f8
Fixed memleak in autocompleter
2014-06-15 17:32:30 +01:00
James Booth
a519d25e4b
Fixed potential segfaults on autocomplete
2014-05-08 20:49:41 +01:00
James Booth
d6e92f62dc
Fixed cppcheck warnings
2014-04-26 00:36:36 +01:00
James Booth
a720ef2627
Removed strcpy calls
2014-04-02 21:01:20 +01:00
James Booth
26726b207a
Updated copyright
2014-03-09 01:18:19 +00:00
James Booth
95c48a0f47
Test message when removing autojoin for non existent bookmark
2014-02-02 01:05:52 +00:00
James Booth
4bd06a5d87
Don't allow /alias to overwrite standard command
2014-01-25 01:39:12 +00:00
James Booth
0de1ff9b4d
Removed unused boolean result from autocomplete add and remove
2013-12-09 23:51:13 +00:00
James Booth
927af868c7
Use stack rather than heap for autcomplete_param_with_func
...
issue #226
2013-09-23 00:05:50 +01:00
Dmitry Podgorny
982f1174a8
refactred autocomplete_remove
2013-08-26 03:29:04 +03:00