Closed snoopy closed 1 year ago
I haven't yet had a chance to try but thanks for the report!
I can reproduce it even with require('textredux')
, so hijack
is not related to this.
The error message comes from here I think: https://github.com/orbitalquark/textadept/blob/11d0399dd2a8719e002db3e8e16522cf994dee6a/init.lua#L283
If I do a
print(load(table.concat(settings, '\n')))
near that line I get
nil [string "buffer["additional_selection_typing"]=true..."]:64: '(' expected near ':'
You can avoid the error message by commenting out this line here:
This still needs a proper fix on initialising the styles.
There have been quite a few changes in the first alpha: https://github.com/orbitalquark/textadept/releases/tag/textadept_11.5_alpha
Do you still get this with the latest Qt-based Nightly, @snoopy ? Seems to have fixed this.
Can confirm the issue no longer happens with latest nightly.
Thanks for confirming!
I'm afraid I forgot to remove the fix you proposed before testing with the Qt version. For me the error does indeed persist (your fix still works though), sorry about that.
Did you actually manage to have it work without the fix in the latest Qt-based nightly?
Unfortunately, I get the error with the latest Nightly. :-/
Removed the code in https://github.com/rgieseke/textredux/commit/2a7acfcc2e36fd1ad9c2629d58b2e2c210432973
It seems to work without that so I hope that's no problem!
As far as I can tell this change only breaks the highlighting in lists. Everything else is a total mess right now though.
Simply starting TA with the TR hijack enabled results in this error for me:
~/.textadept/modules/textredux/init.lua:115: attempt to index a nil value (field '?')
.
With line 115 being local goto_mark = m_bookmark[_L['Goto Bookmark...']][2]
I can't get the the wrapped lists to show up reliably anymore either. When they do show up they have the same problem as before where they always return the first entry regardless of user choice.
Thanks for your efforts and I'm sorry I can't offer anything more substantial.
Sorry about that. Did you fetch the latest changes from GitHub?
I just tried with a clean .textadept
directory (like textadept -u ta-test
)
and only
local textredux = require('textredux')
textredux.hijack()
in it. I don't get an error and open file, open recent, select lexer seem to work.
(There is no keyboard shortcut for "Go to Bookmark", so it can't really be hijacked I think, but that's probably a separate issue anyways.)
Please reopen this or a separate issue if you still encounter a problem!
Can you confirm this error on the latest version of Textadept?
textadept_nightly_2022-10-10/init.lua:283: bad argument #2 to 'connect' (function expected, got nil)
Happens with the latest alpha as well.init.lua used for testing: