1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-08-16 16:20:38 +03:00
Commit Graph

10555 Commits

Author SHA1 Message Date
Maxime Coste
575f49f1b4 Merge remote-tracking branch 'lenormf/fix-3972' 2024-08-14 21:32:42 +10:00
Maxime Coste
203e3704d8 Fix json-ui scroll support
Add cursor coordinate parameters, and fix encoding to match the
new one.
2024-08-14 21:32:03 +10:00
Maxime Coste
a553ed5aa1 Merge remote-tracking branch 'ericv8v9s/master' 2024-08-14 21:11:04 +10:00
Maxime Coste
b7c014ba4f Merge remote-tracking branch 'enricozb/enricozb/scroll-coordinates' 2024-08-14 21:09:53 +10:00
Maxime Coste
a0a000951e Merge remote-tracking branch 'arrufat/support-double-underline' 2024-08-14 21:06:14 +10:00
Maxime Coste
c8f8548130 More include fixes 2024-08-14 20:35:04 +10:00
Maxime Coste
7a60ae9a7f Add missing include for non libstdc++ builds 2024-08-14 20:32:52 +10:00
Maxime Coste
df80aef04b Bump freebsd build to latest
The freebsd/13.x image seems to be failing at the moment
2024-08-14 20:30:31 +10:00
Maxime Coste
f25dc419c7 More test timing fix 2024-08-14 19:12:49 +10:00
Maxime Coste
238e5e7659 Try to make tests less timing sensitive 2024-08-13 20:39:44 +10:00
Maxime Coste
560e3631ec Move debug utils to debug.hh/debug.cc
Lots of code includes buffer_utils.hh just for write_to_debug_buffer
which pulls many unnecessary dependencies. Reorganise to reduce
compile times.
2024-08-12 20:02:11 +10:00
Maxime Coste
6ed01f402b Reduce headers dependency graph
Move more code into the implementation files to reduce the amount
of code pulled by headers.
2024-08-12 20:02:11 +10:00
Maxime Coste
1b2100753e Reduce exposed headers from context.hh 2024-08-12 20:02:11 +10:00
Maxime Coste
1a52006c3d Extract format implementation to its own file
Split it to avoid pulling all string_utils dependencies for just
format.
2024-08-12 20:02:11 +10:00
Maxime Coste
2d9886afe7 Remove void_t and use requires instead 2024-08-12 20:02:11 +10:00
Maxime Coste
a250b96c18 Move most info/status clear logic to client
This makes it possible to remove the pending clears whenever an
info/status line is explicitely added, removing a class of race
conditions introduced by the previous implementation.
2024-08-12 17:10:12 +10:00
Eric
d15208fc19
Fixed highlighter marking everything as ruby string in ERB files 2024-08-09 09:33:56 -04:00
Maxime Coste
6af7a847c7 Delay NormalMode clearing of status line and info box to next idle
A common pattern is for info/echo messages to be generated by idle
hooks but the clearing of previous info/echo was done immediately on
normal mode events. This led to flickering of the info box especially
when a hook was repeatidly generating the same info (like moving
a cursor in the same word where the hook reacts to the word under
the cursor).
2024-08-08 13:08:01 +10:00
Thomas Teixeira
31e0c81156 Add gleam language support 2024-08-06 22:15:01 +10:00
Thomas Teixeira
3dcc042fb4 Thomas Teixeira 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.
--
2.45.2
2024-08-06 22:14:28 +10:00
Enrico Zandomeni Borba
0fddb3fef8 fix mouse scrolling 2024-08-06 09:03:38 +02:00
Johannes Altmanninger
ef18d3cbfb rc make/grep: evaluate makecmd in calling context, use eval semantics again
I configured :make to use a special makecmd for files called test.cpp.

	hook global BufCreate .*/test.cpp %{
		set-option buffer makecmd "g++ %val{buffile} && ./a.out"
	}

Commit c93cb5c4d (Add a `fifo` helper command and refactor `make`
and `grep` to use it, 2024-06-07) made :make evaluate makecmd in the
toolsclient context instead of the calling context, so my buffer-local
override no longer applies. I'm not sure if this is something we want
to guarantee but it doesn't seem unreasonable, and we can fix it a
no cost I think.

Additionally, it changed

    eval "${kak_opt_makecmd}" "$@";

to

    $kak_opt_makecmd "$@"

meaning that the "&&" in my makecmd will no longer be evaluated.
Instead it will be passed as argument to g++, effectively

    g++ %val{buffile} '&&' ./a.out

which I don't think is a reasonable expectation (unless we change
makecmd to be str-list options).  Essentially, the above only applies
word splitting to makecmd; it seems simpler and less surprising to
treat them as raw shell commands.

Expand makecmd in the calling client again, and insert it verbatim
into the shell script.

grep hasn't needed it so far but keep it consistent.
2024-08-05 19:14:48 +10:00
Enrico Zandomeni Borba
f2e7498ccc fix mouse coord underflow
previously, clicking on the status line if it is on the top of the
window results on a coord.line = 1 << 16, or there abouts. This is
because the expression

  (key & 0xFFFF0000) >> 16

results in an `shr` instruction which does not propagate the sign
bit. Mouse event coordinates can be negative if the status line is
on top and the status line is clicked. The new line

  (int32_t) (key & 0xFFFF0000) >> 16

properly propagates the sign bit, leading to the correct signed
numeric line coordinate.
2024-08-04 21:28:21 +02:00
Enrico Zandomeni Borba
e7605b4ec9 Enrico Zandomeni Borba
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.
2024-08-04 17:41:27 +02:00
Enrico Zandomeni Borba
7093f14291 add scroll coordinates
adds scroll amount in the upper 16-bits of `Key.modifiers`, reclaiming
the space in `Key.key` for coordinates. Previously, while mouse events
included their coordinates, scrolling did not. Scroll events are now
emitted as <scroll:amount:line.column>.
2024-08-04 17:40:29 +02:00
Adrià Arrufat
2ab35fbb23 Add support for double underline 2024-08-04 20:55:21 +09:00
Maxime Coste
8a5f449c18 Move most code in regex_impl inside the anonymous namespace
This is all internal code that should not be exposed.
2024-08-04 15:36:03 +10:00
Maxime Coste
10ed78fe8a Reduce templatization further to reduce binary size 2024-07-27 16:08:35 +10:00
Maxime Coste
128dafdfe9 Pass libs after object files to linker
Fixes #5206
2024-07-27 16:07:38 +10:00
Maxime Coste
46270444e4 De-templatize regex selection code
This led to lots of duplicated code gen, longer compile time, and
most likely unnoticeable performance difference
2024-07-24 22:00:34 +10:00
Maxime Coste
f8b3972375 Merge remote-tracking branch 'JustTaken/doc-review' 2024-07-24 21:28:53 +10:00
Maxime Coste
07674ac1a4 Merge remote-tracking branch 'JustTaken/view-offset' 2024-07-24 21:27:33 +10:00
JustTaken
02aa8debcb Review some buffer names in documentation
Now `\*debug*` and `\*scratch*` are used when refering these buffers
for prettier presentation.
2024-07-22 18:02:15 -04:00
JustTaken
ab7bfec047 Fix logic to get minimun custom offset
Now the scrolloff can be specified in the configuration file and
if either one of the column or line offset given is too large to
fit in the buffer, half of the window dimension is taken in it's
place. `v<` and `v>` account custom scroll offset as well.
2024-07-22 16:20:42 -04:00
Tobias Pisani
cb6f139786 Allow escaping commas in the -buffer argument to eval/exec
I had this issue with device tree binding files in zephyr, that follow the vendor,device.yml
convention. The linux kernel presumably uses it as well.

While allowing escaping helps, we might consider using a separate option. The most obvious
approach might be to move the current behavior to -buffers, and have -buffer be
verbatim. However, I'm not entirely sure about the impact of that breakage,
so for now, at least the ability to escape it.
2024-07-22 23:31:15 +10:00
Maxime Coste
e938d724f1 Handle word completion when recording macros
Make last insert and macro recording closer together, paving the
way towards moving last insert to a register.

Use a FunctionRef for insert completer key insertion support.
2024-07-22 20:22:14 +10:00
JustTaken
cbe2997bb5 JustTaken 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.
2024-07-20 23:42:36 -04:00
JustTaken
38d4a75180 Take in account scrolloff when moving viewport
`vt` and `vb` respect custom scroll offset
2024-07-20 23:11:43 -04:00
Maxime Coste
6f562aa0ad Merge remote-tracking branch 'stacyharper/improve-php-heredoc' 2024-07-21 00:50:06 +10:00
Maxime Coste
7ef749965b De-templatize select_object
This removes lots of duplicated codegen at the expense of slightly
worse constant folding optimizations
2024-07-21 00:50:02 +10:00
Maxime Coste
a5ba9bb45f Disable UnitTest fully in non KAK_DEBUG builds
The code was still compiled and stored in the release executable,
this reduces the optimized binary size.
2024-07-21 00:50:02 +10:00
Maxime Coste
011283e4d2 Make sourcing gdb/kakoune.py automatically add the pretty printers
If pretty printers are not enabled, we can now just `source
gdb/kakoune.py` from gdb.
2024-07-19 13:07:31 +10:00
Maxime Coste
c971c42002 Record macros in repeat last insert
This fixes an issue with the following hooks:

hook global InsertCompletionShow .* %{ map window insert <tab> <c-n> }
hook global InsertCompletionHide .* %{ unmap window insert <tab> <c-n> }

When repeating a last insert using <tab> to select a completion, it
inserts a <tab> instead of selecting, then the insert completion tries
to erase the inserted text with backspaces but fails to totally do that
as it erases the tab character first.
2024-07-19 13:03:26 +10:00
Maxime Coste
8a109bd2f4 Bump history max size to 1000
100 was a bit small for long running sessions.
2024-07-18 09:52:27 +10:00
Willow Barraco
756a16769c
php: improve heredoc
Support nowdoc, and make ';' optional
2024-07-17 17:01:45 +02:00
Maxime Coste
fe8a03d158 Bump cirrus macos_gcc build to use g++-12 to fix crash on throw
It seems g++-10 running on rosetta on macos ventura triggers
generates some code that crashes in __cxa_throw, this seems
similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98805

We already have plenty of testing with gcc 10 so we can bump
macos gcc to workaround this.
2024-07-17 20:18:03 +10:00
Maxime Coste
12deb7d5da Clear info box and prompt on paste 2024-07-17 20:00:13 +10:00
Maxime Coste
e3ffa05ff0 Avoid doc renderer corner case in execeval page
The doc renderer is not expected to fully support asciidoc and can need
a bit of help by avoiding corner cases in pages

Closes #5198
2024-07-17 19:53:53 +10:00
Maxime Coste
840f4ec3ed Improve error message for alternations in lookarounds and add tests
Fixes #5203
2024-07-15 22:02:43 +10:00
Maxime Coste
c0013dcab2 Merge remote-tracking branch 'lobre/hooks-doc' 2024-07-15 20:43:22 +10:00