Commit Graph

8165 Commits

Author SHA1 Message Date
Maxime Coste
f7a2ecfacb Support empty ranges in replace-ranges highlighter 2020-04-06 11:23:47 +10:00
Jason Felice
7e5936ba23 diff.kak: add diff file and diff hunk text objects 2020-04-03 15:48:54 -04:00
Maxime Coste
c585107ab5 Add -override support to add-highlighter
This allow replacing a highlighter in place, not loosing its current
position in its parent.

Fixes #3436
2020-03-30 21:04:01 +11:00
Maxime Coste
b42885ef71 Fix empty strings not being zero terminated 2020-03-29 20:28:56 +11:00
Frank LENORMAND
7d987c013e rc lint: Check the lintcmd option is set in :lint-buffer
Calling `:lint-buffer` when `lintcmd` is empty results in a temporary
directory being created, but never removed when the underlying linting
code errors out.
2020-03-27 10:20:40 +03:00
Maxime Coste
8f30e37507 Untie focus reporting and mouse handling 2020-03-27 07:54:21 +11:00
Las
e142a37f21 rc ruby: Don't recognize "keyword"-like identifiers
In Ruby, identifiers can end with a `!` or `?` too, which means that `class!` or `end?`are not actually keywords, but regular identifiers. This fixes that by not using `\b` but `[^0-9A-Za-z_!?]` instead in some places.
2020-03-25 21:18:21 +09:00
Isaac Freund
9396f508c2
Fix indentation of auto-extended comments 2020-03-22 20:19:43 +01:00
Isaac Freund
6198cc5e47
Encapsulate zig highlighting and commands in a module 2020-03-22 19:24:39 +01:00
Isaac Freund
3098557e25
Add indent rules 2020-03-22 19:18:15 +01:00
nia
7d4a83a449 || -> or for consistency 2020-03-22 11:00:27 +00:00
nia
28982aae92 Fix build on NetBSD 2020-03-22 10:49:06 +00:00
Isaac Freund
23b28df1b8
Use attribute face where appropriate 2020-03-22 10:50:29 +01:00
codesoap
94cdd3f9e3 rc spell: Avoid C-style comments in awk 2020-03-22 08:13:30 +01:00
Isaac Freund
6190f8ce70
Add syntax highlighting for zig 2020-03-21 22:46:19 +01:00
Isaac Freund
e7044d7eeb
Isaac Freund Copyright Waiver
I dedicate any and all copyright interest in this software to the
public domain.  I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors.  I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
2020-03-21 22:41:54 +01:00
Maxime Coste
3c265acd6c Remove posB from information given by the diff algorithm
posB is always the sum of previous add len and previous keep len,
so very easy to keep track of.
2020-03-20 20:27:50 +11:00
Maxime Coste
401ef84a4b Remove uses of reverse_iterator in diff implementation 2020-03-20 20:24:42 +11:00
Frank LENORMAND
07d702e419 src: Fix a compilation bug with g++-8
The Ubuntu Disco distribution comes with `g++` v8 installed by default,
which is not able to deduce the return type of a particular call to
`transform()`.

This commit explicitly declares the return type to mitigate that
problem, and allow the file to compile.

Fixes #3410
2020-03-17 09:00:29 +03:00
Maxime Coste
329f291ae0 Merge remote-tracking branch 'Anfid/hunk-seek-wrap' 2020-03-15 12:35:50 +11:00
Maxime Coste
1b28a19058 Merge remote-tracking branch 'Anfid/scroll-test' 2020-03-15 12:32:54 +11:00
Maxime Coste
09375edf54 Merge remote-tracking branch 'occivink/arrange-buffers' 2020-03-15 12:18:04 +11:00
Maxime Coste
e5aaf8c9fa Merge remote-tracking branch 'lenormf/github-templates-new' 2020-03-15 12:15:05 +11:00
Maxime Coste
0282cc022e Use %file in the test run script instead of %sh 2020-03-14 13:52:04 +11:00
Maxime Coste
7545fa58ae Fix invalid access to deleted line when updating insert completion
The computation of the completion end position was taking place too
early, before we checked if the buffer did get modified.

Fixes #3349
2020-03-14 13:49:52 +11:00
Maxime Coste
31caae20eb Allow reading from fifo in readonly buffers
readonly is supposed to prevent the user from modifying the buffer
and it can be useful to generate a readonly fifo buffer.

Fixes #3398
2020-03-14 12:58:22 +11:00
Maxime Coste
21dc5284b2 Fix use of non-posix \x printf escape 2020-03-13 09:33:19 +11:00
Maxime Coste
8c2ef4965a Merge remote-tracking branch 'lenormf/fix-completion-escaping' 2020-03-13 08:08:17 +11:00
Maxime Coste
83a17227a5 Merge remote-tracking branch 'lenormf/fix-Makefile-compiler-string' 2020-03-13 08:06:42 +11:00
Maxime Coste
a53d501f7b Merge remote-tracking branch 'lenormf/fix-3399' 2020-03-13 08:05:04 +11:00
Maxime Coste
149da2064d Handle invalid utf8 in command line a bit better
Reduce the amount of decoding by working directly on
bytes.

Fixes #3388
2020-03-13 08:02:58 +11:00
Frank LENORMAND
7b28e68d6c src: Don't escape completion candidates with \
Completion candidates are currently escaped with a backslash `\`
character, which leads to ugly interactive commands on the prompt,
especially when they contain space characters.

This commit makes completion candidates be escaped by simple quoting.

Examples:

    candidate\ with\ spaces
    \%opt{foo}
    \"dquote
    \'quote

become:

    'candidate with spaces'
    '%opt{foo}'
    '"dquote'
    '''quote'
2020-03-12 22:24:44 +03:00
Frank LENORMAND
789caf89a3 rc Makefile: Fix the predicate to detect g++
Some distributions replace the expected "GCC" tag with their own name
and version, causing the Makefile not to include a compiler flag.
2020-03-12 17:04:34 +03:00
Frank LENORMAND
c175fd12f6 github: Migrate template to the new format, implement new ones
This commit migrates the old issue template to the new format
documented on the following page:

https://help.github.com/en/github/building-a-strong-community/about-issue-and-pull-request-templates

The old "issue template" is now a generic "bug report".

New templates have also been added:

* crash report
* feature request
* question

Providing users with those templates allows reducing redundant
questions to the reporter ("where is the stacktrace", "what is the
usecase" etc), and assigning labels to the created issues
automatically.

A pull request template that refers to the CONTRIBUTING document and
reminds the reporter to create a waiver commit is also implemented
by this commit.
2020-03-12 13:09:17 +03:00
Mikhail Pogretskiy
8c7bb10e56 rc git: Make git next/prev-hunk behavior consistent with search command 2020-03-11 13:56:28 +07:00
Frank LENORMAND
e83ad2a2a4 rc spell: Re-implement message processing in Awk
Plain shell takes too long on large files.

Fixes #3399
2020-03-09 14:22:34 +03:00
Maxime Coste
6766297623
Merge pull request #3395 from jo-he/master
restore F1 key handling
2020-03-06 10:57:27 +11:00
Joachim Henke
3881dc1e7a restore F1 key handling 2020-03-04 09:06:46 +01:00
Maxime Coste
610be9ac20 Fix invalid memory access in unit-tests 2020-03-04 12:08:16 +11:00
Maxime Coste
aad4612387 Recommend clang >= 6 as current code triggers a bug in clang 5 2020-03-03 21:15:38 +11:00
Maxime Coste
e3a5856284 Only replace chars >= 0 in fix_atom_text
If char is signed, the test was invalid

Fixes #3389
2020-03-03 20:16:31 +11:00
Maxime Coste
f682d8c01f Merge remote-tracking branch 'chambln/git' 2020-03-03 07:55:12 +11:00
Maxime Coste
7a9292be58 Merge remote-tracking branch '6112/clippy-delay' 2020-03-03 07:49:02 +11:00
Maxime Coste
62983b9bb5 Merge remote-tracking branch 'eraserhd/new-lint-refresh' 2020-03-02 20:53:33 +11:00
Maxime Coste
0a66eb9c47 Expand env vars as list of strings
This makes it possible to do :select `%val{selections_decs}` and to
correctly combine $kak_quoted with those.
2020-03-02 20:53:28 +11:00
Jason Felice
1ed8b84762 Fix unnecessary refreshes
Incrementally setting the lint variables triggers multiple refreshes,
including the text jumping as the guttter column is removed and re-
added.  This causes the info message to disappear when linting is done
on NormalIdle.
2020-02-28 21:44:10 -05:00
Nicolas Ouellet-Payeur
10d887583f Make on_next_key_with_autoinfo() respect idle_timeout
The prompt and autocomplete normally wait for `idle_timeout` before showing
suggestions, however commands like `g`, `v`, or the lead-key show Clippy
instantly.

This fixes the issue by making `on_next_key_with_autoinfo()` wait for
`idle_timeout` before displaying suggestions.

Fixes mawww/kakoune#3365
Fixes mawww/kakoune#2066
2020-02-27 10:36:15 -05:00
Gregory Chamberlain
13d042cf8f rc git: Fix highlighting of ‘:git log --graph’
Looks like hyphens and periods are sometimes printed as part of
git-log(1)’s graphing feature; for example, in this repository:

    git log --graph 55e7f857
2020-02-27 05:11:11 +00:00
Nicolas Ouellet-Payeur
97e5e75d4c Nicolas Ouellet-Payeur Copyright Waiver
I dedicate any and all copyright interest in this software to the
public domain.  I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors.  I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
2020-02-26 10:32:45 -05:00
Maxime Coste
b8eef27e04 Enable terminal application keypad mode 2020-02-26 17:45:52 +11:00