-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File browser doesn't handle non-latin input #5
Comments
Probably adding the character codes of these letters to Textadept's E.g., in your
http://foicica.com/textadept/api/keys.html#KEYSYMS
|
Can confirm it works. With a minor glitch though - you should delete russian letters twice (cause of letter size, I guess). @suhr, you are welcome to checkout my gist for russian layout - second part is for textredux. P.S. |
If char is not registered in Textadept (e.g. russian by default aren't rgieseke#5) the error breaks the workflow - especially when you work in several views (it changes focus to other view).
Many thanks for sharing your gist, this topic has come up (also in Textadept) a couple of times over the years. As for the the back-deleting, there should be a way to check if it's a UTF-8 2-byte character In listbuffer.keys['\b'] = function()
local search = self.get_current_search(self)
if search then self.set_current_search(self, search:sub(1, #search - 1)) end
end Maybe using utf8.len http://www.lua.org/manual/5.4/manual.html#6.5 And maybe there is a better solution in genreal using the It's used in a couple of places in Textadept: https://github.com/search?q=utf8+path%3Amodules%2Ftextadept+repo%3Aorbitalquark%2Ftextadept+language%3ALua+language%3ALua&type=Code&ref=advsearch&l=Lua&l=Lua Does the Command Entry work with your keyboard layout? If yes, this could be a direction to use with Textredux. Textadept's -- Other.
-- UTF-8 input.
[function()
ui.command_entry.run(
function(code) buffer:add_text(utf8.char(tonumber(code, 16))) end)
end] = {nil, 'cmd+U', 'meta+u'}
} |
Yes, the Command Entry works in russian (I mean, it handles the input). So I see we can use this |
So a quick test seemed to work for me, in events.connect(events.CHAR_ADDED, function(code)
local _textredux = buffer._textredux
if not _textredux then return end
if _textredux.on_char_added then
local char = utf8.char(code)
if char ~= nil then
_textredux.on_char_added(char)
end
end
end) This will probably require some more testing ... but if you can give it a try that would be good (if you have the time). |
File browser filters list by latin input, but doesn't ever respond on non-latin (e.g russian) one.
The text was updated successfully, but these errors were encountered: