Commit Graph

10124 Commits

Author SHA1 Message Date
Maxime Coste
a8f289000c Merge branch 'readme' of http://github.com/Pound-Hash/kakoune 2022-05-16 19:49:22 +10:00
Maxime Coste
e570dc0a61 Merge remote-tracking branch 'sidkshatriya/ocaml-comment-convenience' 2022-05-16 19:48:02 +10:00
Maxime Coste
860be32ddd Merge branch 'command_parsing' of http://github.com/Pound-Hash/kakoune 2022-05-16 19:46:58 +10:00
Sidharth Kshatriya
70f9d8fbef OCaml: Recognize '\"' as a char literal and not the start of a string literal 2022-05-15 11:23:06 +05:30
Sidharth Kshatriya
8cfe59fcb0 OCaml: Automatically insert closing comment when user starts a comment
An OCaml comment is `(* Some comment *)`. Like the C-family this can be
a multiline comment.

Recognize when the user is trying to commence a comment when they type `(*` and
then automatically insert `*)` on behalf of the user. A small convenience.

Co-authored-by: Maxime Coste <mawww@kakoune.org>
2022-05-13 12:58:30 +05:30
Pound_Hash
a3c0665acc 1) Modified some wording to be more precise
2) Reformatted paragraphs to wrap at column 80
3) Added periods are the end of several lines for overall consistency
2022-05-10 09:53:03 -07:00
Maxime Coste
459c6f589f Merge branch 'cjs' of http://github.com/clarfonthey/kakoune 2022-05-10 22:37:43 +10:00
Maxime Coste
a28dd16b2e Merge remote-tracking branch 'adamchristiansen/gitignore-highlighting' 2022-05-10 22:36:44 +10:00
Maxime Coste
ae001a1f91 Run EventManager whenever writing to a file descriptor would block
This approach is not very elegant as it hooks into the event manager
deep inside the call graph, but solves the exiting issue and is an
okay stop gap solution until a better design comes up.

Fixes #4605
2022-05-10 22:36:13 +10:00
ltdk
fadbad51ca Mark .cjs as javascript 2022-05-09 13:20:27 -04:00
Adam Christiansen
1735aae85f Fixed extra + sign leftover from patch
An extra + sign was removed that was a remnant of a suggested
patch/diff.
2022-05-09 09:30:39 -06:00
Adam Christiansen
70013f5174 Fix gitignore highlighter glob handling
Fixes the handling of multiple backslashes before gitignore * and ?
glob patterns. Adds character classes to gitignore highlighting.

Co-authored-by: Johannes Altmanninger <aclopte@gmail.com>
2022-05-09 09:30:33 -06:00
Maxime Coste
3882b0e21b Merge branch 'gitmodules' of http://github.com/clarfonthey/kakoune 2022-05-09 20:07:47 +10:00
Maxime Coste
7f245e92fb Merge branch 'doc_doc' of http://github.com/Pound-Hash/kakoune 2022-05-09 20:04:53 +10:00
Maxime Coste
e036c4556a Merge remote-tracking branch 'c7skasku/highlight-0X' 2022-05-09 20:03:37 +10:00
Maxime Coste
34e4c53c50 Merge remote-tracking branch 'in0ni/master' 2022-05-09 20:03:02 +10:00
Johannes Altmanninger
987e367955 Work around incomplete std::to_chars() support in libstdc++ 10
Ubuntu 20.04 ships GCC's libstdc++ 10 from 2020 which implements
std::to_chars() for integers but not for floats. Use the float overload
only if the library advertises support via the feature testing macro.

This can be removed once we require GCC 11 (see
https://www.gnu.org/software/gcc/gcc-11/changes.html).

Closes #4607
2022-05-08 14:00:27 +02:00
Adam Christiansen
ed99e056b6 Add gitignore highlighting 2022-05-07 20:14:29 -06:00
Adam Christiansen
fc0a9cbab0 Adam Christiansen 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.
2022-05-07 20:07:06 -06:00
Pound_Hash
ac5ebe70ae Wrapped the lines at the 80th column 2022-05-06 10:33:12 -07:00
Cormac Stephenson
6a630ae3e6 c-family: highlight 0X style int literals 2022-05-05 13:41:35 +01:00
Maxime Coste
56c3ab4ff8 Fix parsing of INT_MIN %arg
Fixes #4601
2022-05-05 20:05:24 +10:00
Maxime Coste
d2f9bc8d80 Use std::to_chars to int to str conversion 2022-05-05 08:42:04 +10:00
in0ni
0cf5105df1
Merge branch 'mawww:master' into master 2022-05-03 22:15:42 -04:00
Andrés González
9b49c5db0d fix single line comment behavior on insert, remove unnecessary commented blocks 2022-05-03 22:11:28 -04:00
ltdk
e809b9bfcc Mark gitmodules as ini 2022-05-03 17:49:10 -04:00
Maxime Coste
5c6238ef11 Remove invalid assert in ScopedForceNormal destructor
commit 90db664635 introduced logic
to handle the case where the mode had been removed, but did not
get rid of the assert.
2022-05-01 20:59:29 +10:00
Maxime Coste
a1940a3745 Merge branch 'patch-5' of http://github.com/throwawayaccount12345-1/kakoune 2022-05-01 20:54:43 +10:00
Maxime Coste
3e83c17ec8 Merge remote-tracking branch 'krobelus/fix-autorestore-regression' 2022-05-01 20:53:54 +10:00
Johannes Altmanninger
8a7109f9c5 Fix compilation due to failing template deduction for aggregates
gcc 11.2.0 compiles us just fine but clang 13.0.1 fails with this error

	clang++ -DKAK_DEBUG -O0 -pedantic -std=c++2a -g -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-address -frelaxed-template-template-args -Wno-ambiguous-reversed-operator -MD -MP -MF .ranges.debug.d -c -o .ranges.debug.o ranges.cc
	ranges.cc:30:17: error: no viable constructor or deduction guide for deduction of template arguments of 'Array'
	    check_equal(Array{{""_sv, "abc"_sv, ""_sv, "def"_sv, ""_sv}} | flatten(), "abcdef"_sv);
	                ^
	./constexpr_utils.hh:14:8: note: candidate template ignored: couldn't infer template argument 'T'
	struct Array
	       ^
	./constexpr_utils.hh:14:8: note: candidate function template not viable: requires 0 arguments, but 1 was provided
	1 error generated.

The same error can be reproduced with this C++ input

	template<typename T, int N>
	struct Array
	{
	    T m_data[N];
	};
	void test() {
	    (void)Array{{1, 2}};
	}

Since "Array" has no constructor, the compiler uses aggregate
initialization. Only recent g++ seems to be smart enough to deduce
template arguments in this case. Help other compilers by adding a
deduction guide. The deduction guide needs to count the array elements
to infer the array size, hence we need to remove braces. Happily,
this is allowed and it's also what std::array does.

Closes #4597
2022-04-28 19:34:36 +02:00
Johannes Altmanninger
52a7c58670 rc autorestore: fix regression due to ! breaking change
Commit 85b78dda (src: Select the data inserted by `!` and `<a-!>`,
merged on 2021-03-06) broke autorestore by making it delete the
restored content.  I've been using it for 6 months but never noticed
since I didn't use autorestore

Reproducer:

	HOME=$PWD kak -s foo README.asciidoc -e 'exec iUNSAVED-CONTENT'
	# In another terminal:
	ps aux | awk '/kak -s foo/ {print $2; exit}' | xargs kill -HUP
	HOME=$PWD kak -s foo README.asciidoc

Delete the trailing newline instead of the restored content.

While at it, remove some <space> commands from execute-keys, to make
it work on the breaking-cleanups branch which swaps <space> and ",".

Closes #4335
2022-04-28 19:32:24 +02:00
Maxime Coste
ceaac1c400 Merge remote-tracking branch 'danr/patch-4' 2022-04-25 19:31:48 +10:00
Maxime Coste
bb742eda0f Merge remote-tracking branch 'in0ni/master' 2022-04-25 19:31:16 +10:00
Maxime Coste
f953ce1746 Merge remote-tracking branch 'AndrewVos/patch-1' 2022-04-25 19:29:42 +10:00
Maxime Coste
81b520847c Introduce a flatten range adapter and use it in execute_keys_cmd
This avoids allocating a KeyList vector in which to flatten all
the different arguments and simplifies the client logic.
2022-04-25 19:27:16 +10:00
Dan Rosén
3b0f69a6d6
Fix documentation for %val{window_range}
Makes line and column be the right way around in the docs.
2022-04-22 21:26:15 +02:00
throwawayaccount12345-1
3ab88f4b7c
rc file-detection hook group
Add a group to the `file-detection` hooks.

There's no way to remove hooks without a group. With this patch, you'll be able to remove those
`file-detection` hooks manually. There's no need for two separate groups since if you wanted to
remove only one, you could run `remove-hooks` and then only add one again.


Related: #3670
2022-04-20 23:11:10 -03:00
Andrés González
384d89ba7a Merge branch 'master' of github.com:in0ni/kakoune 2022-04-19 18:36:32 -04:00
Andrés González
abc3654765 include : and :: as being highlighted for pseudo classes 2022-04-19 18:31:33 -04:00
Pound_Hash
56287daac0 Fixed English mechanics: grammar, punctuation, and wording 2022-04-16 12:08:24 -07:00
Johannes Altmanninger
0cf7191033 Make Shift+Space insert a space in insert mode
Terminals that support CSI u escape codes (like iTerm2, Kitty and foot)
allow us to map <s-space> independently of <space>.

Users expect that <s-space> inputs a space character; make it so.

Fixes #4534
Also reported in https://discuss.kakoune.com/t/shift-space-doesnt-send-space-character/2004
2022-04-16 19:56:26 +02:00
Pound_Hash
ecf7e0be18 Amendments to grammar and punctuation.
I'm being told to commit changes before rebasing.
2022-04-16 09:58:46 -07:00
Andrew Vos
0f966e656b
Disable external diff tools when diffing buffer
There is a bug that causes `:git show-diff` to fail when using an external diff, for example difftastic.

This change ensures that we don't use an external diff tool when diffing the current buffer.
2022-04-12 16:26:38 +01:00
Andrés González
4215e8a6eb use '0:FACE' for selectors as the entire string should be highlighted 2022-04-12 08:38:18 -04:00
Andrés González
b81d38da5e remove '+a' in pseudo classes face 2022-04-12 08:31:06 -04:00
Andrés González
8888b8d561 only highlight html tags (1:keyword), fix typo in pseudo 2022-04-12 08:27:47 -04:00
Andrés González
480be5207c allow html tags to be followed by comma, create cssLogicalOperator face 2022-04-12 08:22:56 -04:00
Maxime Coste
90db664635 Fix crash when deleting a buffer from a user mapping
Deleting a buffer resets normal mode on all clients that were
displaing that buffer, but ScopedForceNormalMode that are used
from user mode  do not take this possiblity into account on
destruction, which leads to deleting the last normal mode from
the context, ending up with an empty mode stack.

Fixes #3909
2022-04-12 12:49:19 +10:00
Pound_Hash
0ba945d585 Fixed English mechanics: grammar, punctuation, wording 2022-04-11 15:41:46 -07:00
Maxime Coste
b2c6bc4690 Merge branch 'doc-buffers' of http://github.com/Pound-Hash/kakoune 2022-04-11 19:55:34 +10:00