Commit Graph

4961 Commits

Author SHA1 Message Date
Maxime Coste
d539e8fb89 Do not decode utf-8 when looking for regex next start
There is no need to decode as we know any non-ascii characters will
be treated as Other in the StartDesc.
2019-12-04 22:33:11 +11:00
Maxime Coste
ee2985739b Merge remote-tracking branch 'lenormf/window-range' 2019-12-04 21:16:11 +11:00
Maxime Coste
5c5d881c11 Merge remote-tracking branch 'lenormf/reload-buffer-hash' 2019-12-04 21:14:15 +11:00
Frank LENORMAND
e1bd076f5e src: Reload buffers when their contents' hash changes
Instead of triggering a reload event when the timestamp of a buffer's
underlying file changes, do so when its contents are actually modified.
2019-12-03 17:05:24 +01:00
Maxime Coste
0b66aa8dda Document that fg face is optional 2019-12-03 21:17:33 +11:00
Maxime Coste
36dce6a2d0 Merge remote-tracking branch 'lenormf/split-json' 2019-12-03 21:13:35 +11:00
Maxime Coste
5c1433ee65 Merge remote-tracking branch 'Laaas/patch-1' 2019-12-03 21:11:14 +11:00
Maxime Coste
b5baac4336 Merge remote-tracking branch 'lenormf/fix-doc-face-base' 2019-12-03 20:59:40 +11:00
Maxime Coste
a6a5d866a5 Merge remote-tracking branch 'somasis/master' 2019-12-03 20:59:33 +11:00
Frank LENORMAND
d32a660863 src: Document the base face syntax in :set-face 2019-12-02 11:37:31 +01:00
Frank LENORMAND
63092d12c0 src: Fix the build on Mac
When compiled on Mac with `clang`, the following error occurs at
compile-time:

```
./diff.hh:56:28: error: no member named 'min' in namespace 'std'
    const int max_D = std::min((M + N + 1) / 2 + 1, cost_limit);
                      ~~~~~^
```
2019-12-01 21:55:55 +01:00
Maxime Coste
2623366514 Pass inserted text ranges in InsertCompletionHide hook parameter
Fixes #2898
2019-12-01 21:05:02 +11:00
Kylie McClain
dc1cf24846
buffer.hh: Fix building on musl+libc++
Fixes #3233.
2019-11-29 22:58:36 -05:00
Maxime Coste
4fdbf21ff8 Refactor diff to make allocating a diff vector optional
The diff interface now goes through a for_each_diff function that
uses a callback for each found diff.
2019-11-30 11:29:36 +11:00
Maxime Coste
b765fb4971 Merge remote-tracking branch 'lenormf/fix-mmap-size-check' 2019-11-28 20:35:52 +11:00
Maxime Coste
085e7dd09e Merge remote-tracking branch 'lenormf/patch-2' 2019-11-28 20:32:16 +11:00
Maxime Coste
2904d13420 Add a {\} marker to disable markup processing 2019-11-28 20:23:52 +11:00
Frank LENORMAND
7a384edeb0 src: Check the filesize before calling mmap() 2019-11-26 13:26:31 +01:00
Maxime Coste
fc9e0e8c6a Fix small info text not being displayed 2019-11-26 22:08:05 +11:00
Maxime Coste
a933cae7b9 Merge remote-tracking branch 'lenormf/complete-expansion-reg' 2019-11-26 21:35:05 +11:00
Maxime Coste
9716c7c82d Merge remote-tracking branch 'lenormf/complete-expansion-file' 2019-11-26 21:34:22 +11:00
Frank LENORMAND
7512f5eae6 src: Use begin() to get iterators
When compiling the code with `-Wp,-D_GLIBCXX_ASSERTIONS`, the process
gets aborted, likely because iterators to standard containers are
not obtained in a safe way.

Fixes #3226.
2019-11-25 11:34:39 +01:00
Maxime Coste
6f087e899b Complete rename-buffer with filenames
Fixes #3215
2019-11-24 18:11:29 +11:00
Maxime Coste
6fd486c65e Replace tab characters with spaces in info/echo
This is tricky to fix better than that as tabs make text length
dependent on where it will get displayed and what preceedes it.

Also fix an issue with empty info title

Fixes #2237
2019-11-24 18:11:29 +11:00
Maxime Coste
34f48cc851 Rework ncurses info display, crop content when overlflowing
Optmize the code to avoid allocating like crazy, unify various
info style rendering, crop content and display markers that there
is more text remaining.

Fixes #2257
2019-11-24 18:11:29 +11:00
Maxime Coste
19e1be8e0d Make wrap_lines a lazy range view
Avoid the need to allocate a vector by using the ranges
framework.
2019-11-23 21:50:58 +11:00
Frank LENORMAND
ae85753c41 src: Complete filenames in %file{} expansions 2019-11-23 08:59:44 +01:00
Frank LENORMAND
2cdf86d674 src: Complete register names in %reg{} expansions
Builtin registers have name aliases that can be completed upon when
using a `%reg{}` expansion from the prompt.
2019-11-23 08:47:14 +01:00
Maxime Coste
cb1b03c0db Add support for markup in info boxes
Fixes #2552
2019-11-22 21:50:51 +11:00
Maxime Coste
22d9ffa63a Fix crash when deleting buffers in a BufClose hook 2019-11-22 20:29:55 +11:00
Maxime Coste
82e5346904 Add a -atomic switch to write and change clang.kak to take advantage 2019-11-21 23:38:32 +11:00
Frank LENORMAND
15f6485327
src: Give a reason why :rename-buffer failed 2019-11-18 16:46:53 +00:00
Maxime Coste
c031a276d5 Fix recently introduced ncurses redraw artifact 2019-11-18 21:17:22 +11:00
Maxime Coste
ba621dedd6 Ignore SIGTTOU
We can get this signal while suspending if a parent process (say
git-commit) has already put us in the background. We still need
to reset the termios state to exit raw input mode and make the shell
usable.

Fixes #3069
2019-11-18 21:00:59 +11:00
Maxime Coste
d3c3e59bbf Fix search menu trimmed entry display 2019-11-17 22:53:27 +11:00
Maxime Coste
1de038a743 Move the forked server into a new session and process group
Fixes #3212
2019-11-17 22:44:49 +11:00
Frank LENORMAND
19f1754a2a src json: Limit the recursion depth to 100 2019-11-17 09:27:46 +01:00
Frank LENORMAND
7cdbe1d3d2 src: Move JSON parsing code to its own file
The `json_ui.cc` file contained both data-parsing and UI-related
code. This commit moves the JSON parsing code to its own `json.cc`
file, to separate concerns, make compilation faster when changes are
made to either UI or parsing code, and make the parsing code more
accessible to fuzzers.

The signature of the following function:

```
auto parse_json(StringView json);
```

was changed to:

```
JsonResult parse_json(StringView json);
```

to avoid `auto` deduction issues at compile-time.
2019-11-17 09:27:46 +01:00
Maxime Coste
5378dabdec Fix String::resize not zero-terminating 2019-11-17 09:50:18 +11:00
Maxime Coste
e33ba455c8 Re-merge clear_to_eol in draw 2019-11-13 22:17:08 +11:00
Jason Felice
0f58f01428 Fix display column computations
Closes #3201
2019-11-12 20:43:14 -05:00
Maxime Coste
a7d3976a10 Fix typo 2019-11-13 08:58:15 +11:00
Maxime Coste
e964b68ab8 Add support for selecting and exporting selections in display columns
Fixes #2724
2019-11-12 21:56:45 +11:00
Maxime Coste
7a8f57f97b Add support for a -codepoint switch to the select command 2019-11-12 21:21:24 +11:00
Jason Felice
5fae16faef Implement %val{selections_char_desc}
Fixes #3194
2019-11-12 20:54:32 +11:00
Maxime Coste
6eb820dc54 Fix use after free in enter_user_mode, use user.<name> for modename
Fixes #3192
2019-11-12 08:54:49 +11:00
Maxime Coste
5060a4733a Add mode information to next-key mode name
Currently expose an additional name, the format is up for
discussion.

Fixes #1855
Fixes #2569
Fixes #2672
2019-11-11 21:47:47 +11:00
Maxime Coste
f119fb9524 Aggregatify ConcatView 2019-11-10 12:04:44 +11:00
Jason Felice
87e5a2f512 Avoid copy constructing BufferCoord when comparing 2019-11-09 12:53:45 -05:00
Jason Felice
9692e491ac Fix bad comparison when parsing OSI sequences 2019-11-09 12:53:45 -05:00