From Randy Palamar to ~martanne/devel
Matěj Cepl <mcepl@cepl.eu> wrote: > References: https://github.com/martanne/vis/pull/1148#issuecomment-1792649763 > --- > I am not certain whether this is truly necessary (that > string.find condition is implicitly included in string.gsub > itself), but if it makes you happy. Technically you can be more efficient by storing the start and end index given by string.find and then use string.sub to avoid having to do the match again (as well as saving the getenv call when its not needed) but I'm not going to rat-hole on that. Applied!
From Randy Palamar to ~martanne/devel
Matěj Cepl <mcepl@cepl.eu> wrote: > References: https://github.com/martanne/vis/pull/1148#issuecomment-1792649763 > --- > lua/plugins/complete-filename.lua | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/lua/plugins/complete-filename.lua b/lua/plugins/complete-filename.lua > index 43cf14b1..588ff877 100644 > --- a/lua/plugins/complete-filename.lua > +++ b/lua/plugins/complete-filename.lua > @@ -22,6 +22,9 @@ local complete_filename = function(expand) > range.finish = pos > end >
From Randy Palamar to ~martanne/devel
Matěj Cepl <mcepl@cepl.eu> wrote: > When I select some code with `:x g/set_word_list/ > x/lexer\.([A-Z]+)` I get this nice selection (notice, the use of > group) [1]. I would expect that when running `:c/'\1'` I would > get for each cursor the content of the particular selection. I > don’t, I get [2]. > > That must be wrong, isn’t it? > > Best, > > Matěj > > [1] https://mcepl.fedorapeople.org/tmp/vis-c-before.png
From Randy Palamar to ~martanne/devel
Previously theme parsing included strlen(), even though we could
have retrieved the length directly from lua, and strdup()/free()
because we needed to split the string which required inserting a 0
for termination. This was all energy wasting busy work since all
the information we actually needed was contained in the original
string.
This commit adds ~100 lines of code because I have provided my own
implementation of some functions that we were previously provided
by the C-runtime. This code will be reused later to simplify lots
of other code in sam.c, map.c, vis-lua.c, and likely more. I can't
say if this will be a net reduction of code in vis but I can
guarantee that it will be a net reduction in total lines of code
running on the users machine - C-runtime implementations are often
[message trimmed]
From Randy Palamar to ~martanne/devel
Matěj Cepl <mcepl@cepl.eu> wrote: > I have tightened security (all scripts have `set -eu`), added > `vc_fatal` for reporting and `vc_usage` for usage, and generally > cleaned up syntax (to make shellcheck happy). > --- > vis-clipboard | 23 +++++++++++++++++------ > vis-complete | 44 ++++++++++++++++++++++++++------------------ > vis-open | 30 ++++++++++++++++++++---------- > 3 files changed, 63 insertions(+), 34 deletions(-) > > diff --git a/vis-clipboard b/vis-clipboard > index ad0408d6..c4bc07da 100755 > --- a/vis-clipboard > +++ b/vis-clipboard
From Randy Palamar to ~martanne/devel
Matěj Cepl <mcepl@cepl.eu> wrote: > I have tightened security (all scripts have `set -eu`), added > `vc_fatal` for reporting and `vc_usage` for usage, and generally > cleaned up syntax (to make shellcheck happy). > --- > vis-clipboard | 21 ++++++++++++++++----- > vis-complete | 45 ++++++++++++++++++++++++++------------------- > vis-open | 30 ++++++++++++++++++++---------- > 3 files changed, 62 insertions(+), 34 deletions(-) > I don't really see the point of the prefixed names (vc_*). Personally I would remove it since I doubt there is any reason to source these files from other shell scripts but if you insist on
From Randy Palamar to ~martanne/devel
Matěj Cepl <mcepl@cepl.eu> wrote: > > After applying this, there are lexer files leftover due to the rename: ansi_c, dmd, rstat. > > Reapplied all patches from > https://github.com/orbitalquark/scintillua while > checking. Apparently, both filterdiff(1) is not completely happy > with gh#orbitalquark/scintillua@c6c98d68ecc0 [1] Now it should be correct. > > > Additionally, I suggest including the formatting commit in something like a > > .git-blame-ignore-revs file. > > I am not sure about it: especially with email-driven > collaboration I rebase often and AFAIK git-rebase(1) doesn’t > update this file [2]. Therefore, this should be updated only as
From Randy Palamar to ~martanne/devel
Matěj Cepl <mcepl@cepl.eu> wrote: > > After applying this, there are lexer files leftover due to the rename: ansi_c, dmd, rstat. > > Reapplied all patches from > https://github.com/orbitalquark/scintillua while > checking. Apparently, both filterdiff(1) is not completely happy > with gh#orbitalquark/scintillua@c6c98d68ecc0 [1] Now it should be correct. > > > Additionally, I suggest including the formatting commit in something like a > > .git-blame-ignore-revs file. > > I am not sure about it: especially with email-driven > collaboration I rebase often and AFAIK git-rebase(1) doesn’t > update this file [2]. Therefore, this should be updated only as
From Randy Palamar to ~martanne/devel
Florian Fischer <florian.fischer@muhq.space> wrote: > Hi everyone, > > here is v2 of this patch since there were no additional feedback and I still > think that this patch is an improvement to the status quo. > > v1 -> v2: fix return type and formatting > > Copy of the original cover letter: > > In multiple plugins I manage long running processes using vis:communicate. > > This is the case in vis-lspc and my vis-inotify plugin, which I use to > > atomically reload the theme if the theme file on disk changed. > > > > Both plugins are leaking their processes, because they are not terminated
From Randy Palamar to ~martanne/devel
Matěj Cepl <mcepl@cepl.eu> wrote: > From: Jeremy Bobbin <jer@jer.cx> > > --- > - remove assert.are.equals > > test/.gitignore | 1 - > test/lua/Makefile | 2 +- > test/lua/README.md | 2 +- > test/lua/cursor.lua | 1 - > test/lua/file-empty.lua | 1 - > test/lua/lines.lua | 31 +++++----- > test/lua/map-basic.lua | 1 - > test/lua/pipe.lua | 2 -