Closed korakinos closed 9 years ago
Hi,
Thanks for the report, and sorry for the problems!
I don't see this on Ubuntu (12.04 or 14.10), so it may be specific to Arch. What version (in case it helps for me to install into a VM)?
It looks like it's crashing when trying to draw indicators (presumably when highlighting the results). Do you know if the indicators work at all for you?
I can come up with a simple bit of lua to add an indicator when I'm next at my PC if that helps.
Regards,
Chris
Hi,
no worries, and thanks for helping!
I just noticed that my previous description was imprecise: The crash only happens when the search operation actually finds something. So "#" and "*" crash textadept-curses every time instantly, while "/" and "?" first open an input line at the bottom, and only crash after I enter a string, provided that string is present somewhere in the open buffer.
So yes, it seems likely that highlighting the search results is the problem.
I am not sure what "indicators" are in this context. Is it text highlighting/colors/...? There does indeed appear to be something wrong with that, as I don't have syntax highlighting in textadept-curses. (It works in GUI textadept.) I don't know how else to test, so if you could give me a Lua snippet or tell me what else I should do to test indicators, that would be great.
My textadept version is 7.8. As there is no textadept package in the Arch Linux repos, I built and installed it using this PKGBUILD script from the AUR: https://aur.archlinux.org/packages/te/textadept/PKGBUILD
If it helps, I can try to install 7.9.
As for Arch itself, it is a rolling release distro, so it doesn't have version numbers.
Hi,
I put this into ~/.textadept/modules/indic.lua:
local M = {}
M.indic = _SCINTILLA.next_indic_number()
function M.test()
buffer.indic_fore[M.indic] = 0xFF0000
buffer.indic_style[M.indic] = _SCINTILLA.constants.INDIC_ROUNDBOX
buffer.indic_alpha[M.indic] = 100
-- Find all occurrences to highlight.
buffer.indicator_current = M.indic
buffer:indicator_clear_range(0, buffer.length)
buffer:indicator_fill_range(1, 10)
end
And tested in a short text buffer by entering require('indic').test()
from the Lua command entry; it highlights the first 10 characters (ok, except for the first).
Regards,
Chris
When I run this command in ta-curses (no matter if with or without ta-vi), the window is split and the following message is displayed in the bottom half:
[string "require('indic').test()"]:1: attempt to index a boolean value
Nothing is highlighted.
The same happens in GUI ta, except there I get a new tab.
Oops, sorry - the should be a return M
at the end of indic.lua.
Chris
Added return M
. Now textadept-curses crashes on require('indic').test()
, no matter if with or without textadept-vi and textredux.
So the good news is that there is nothing wrong with textadept-vi. Maybe the AUR installation script has bug—I'll try to look into it. (Really want to try out textadept, but need textadept-vi to overcome my vim addiction…)
Thanks!
Turns out, something in the binaries from http://foicica.com/textadept/ is causing the problem! (The AUR install script is using them.) When I compile textadept from source, it doesn't crash and the highlighting works. I'm going to report this on the mailing list.
textadept-vi makes textadept-curses segfault on search (keys /, ?, * or #) for me. This is reproducable and clearly caused by textadept-vi, as it does not happen with it or both it and textredux disabled. It also does not happen in GUI textadept.
Here is a backtrace:
I have textadept-vi and your fork of textredux cloned in my $HOME/.textadept/modules. I haven't tested all functionality (just installed), but at least basic movement and editing seems to be working.
Textadept version 7.8, running on Arch Linux.
My init.lua reads: