diff options
-rw-r--r-- | core/.buffer.luadoc | 38 | ||||
-rw-r--r-- | core/file_io.lua | 2 | ||||
-rw-r--r-- | core/ui.lua | 1 | ||||
-rw-r--r-- | modules/ansi_c/init.lua | 4 | ||||
-rw-r--r-- | modules/textadept/command_entry.lua | 2 | ||||
-rw-r--r-- | modules/textadept/find.lua | 2 |
6 files changed, 24 insertions, 25 deletions
diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc index f9b92834..a1424c32 100644 --- a/core/.buffer.luadoc +++ b/core/.buffer.luadoc @@ -1649,21 +1649,21 @@ function del_line_right(buffer) end --- -- Deletes the word to the left of the caret, including any leading non-word -- characters. --- `buffer.word_chars` contains word characters. +-- `buffer.word_chars` contains the set of characters that constitute words. -- @param buffer A buffer. function del_word_left(buffer) end --- -- Deletes the word to the right of the caret, including any trailing non-word -- characters. --- `buffer.word_chars` contains word characters. +-- `buffer.word_chars` contains the set of characters that constitute words. -- @param buffer A buffer. function del_word_right(buffer) end --- -- Deletes the word to the right of the caret, excluding any trailing non-word -- characters. --- `buffer.word_chars` contains word characters. +-- `buffer.word_chars` contains the set of characters that constitute words. -- @param buffer A buffer. function del_word_right_end(buffer) end @@ -2899,9 +2899,9 @@ function visible_from_doc_line(buffer, line) end --- -- Returns the position of the end of the word at position *pos*. --- `buffer.word_chars` contains word characters. If *pos* has a non-word --- character to its right and *only_word_chars* is `false`, returns the first --- word character's position. +-- `buffer.word_chars` contains the set of characters that constitute words. If +-- *pos* has a non-word character to its right and *only_word_chars* is `false`, +-- returns the first word character's position. -- @param buffer A buffer. -- @param pos The position in *buffer* of the word. -- @param only_word_chars If `true`, stops searching at the first non-word @@ -2913,14 +2913,14 @@ function word_end_position(buffer, pos, only_word_chars) end --- -- Moves the caret left one word. --- `buffer.word_chars` contains word characters. +-- `buffer.word_chars` contains the set of characters that constitute words. -- @param buffer A buffer. function word_left(buffer) end --- -- Moves the caret left one word, positioning it at the end of the previous -- word. --- `buffer.word_chars` contains word characters. +-- `buffer.word_chars` contains the set of characters that constitute words. -- @param buffer A buffer. function word_left_end(buffer) end @@ -2933,7 +2933,7 @@ function word_left_end_extend(buffer) end --- -- Moves the caret left one word, extending the selected text to the new -- position. --- `buffer.word_chars` contains word characters. +-- `buffer.word_chars` contains the set of characters that constitute words. -- @param buffer A buffer. function word_left_extend(buffer) end @@ -2941,7 +2941,7 @@ function word_left_extend(buffer) end -- Moves the caret to the previous part of the current word. -- Word parts are delimited by underscore characters or changes in -- capitalization. --- `buffer.word_chars` contains word characters. +-- `buffer.word_chars` contains the set of characters that constitute words. -- @param buffer A buffer. function word_part_left(buffer) end @@ -2950,7 +2950,7 @@ function word_part_left(buffer) end -- selected text to the new position. -- Word parts are delimited by underscore characters or changes in -- capitalization. --- `buffer.word_chars` contains word characters. +-- `buffer.word_chars` contains the set of characters that constitute words. -- @param buffer A buffer. function word_part_left_extend(buffer) end @@ -2958,7 +2958,7 @@ function word_part_left_extend(buffer) end -- Moves the caret to the next part of the current word. -- Word parts are delimited by underscore characters or changes in -- capitalization. --- `buffer.word_chars` contains word characters. +-- `buffer.word_chars` contains the set of characters that constitute words. -- @param buffer A buffer. function word_part_right(buffer) end @@ -2967,20 +2967,20 @@ function word_part_right(buffer) end -- text to the new position. -- Word parts are delimited by underscore characters or changes in -- capitalization. --- `buffer.word_chars` contains word characters. +-- `buffer.word_chars` contains the set of characters that constitute words. -- @param buffer A buffer. function word_part_right_extend(buffer) end --- -- Moves the caret right one word. --- `buffer.word_chars` contains word characters. +-- `buffer.word_chars` contains the set of characters that constitute words. -- @param buffer A buffer. function word_right(buffer) end --- -- Moves the caret right one word, positioning it at the end of the current -- word. --- `buffer.word_chars` contains word characters. +-- `buffer.word_chars` contains the set of characters that constitute words. -- @param buffer A buffer. function word_right_end(buffer) end @@ -2993,15 +2993,15 @@ function word_right_end_extend(buffer) end --- -- Moves the caret right one word, extending the selected text to the new -- position. --- `buffer.word_chars` contains word characters. +-- `buffer.word_chars` contains the set of characters that constitute words. -- @param buffer A buffer. function word_right_extend(buffer) end --- -- Returns the position of the beginning of the word at position *pos*. --- `buffer.word_chars` contains word characters. If *pos* has a non-word --- character to its left and *only_word_chars* is `false`, returns the last word --- character's position. +-- `buffer.word_chars` contains the set of characters that constitute words. If +-- *pos* has a non-word character to its left and *only_word_chars* is `false`, +-- returns the last word character's position. -- @param buffer A buffer. -- @param pos The position in *buffer* of the word. -- @param only_word_chars If `true`, stops searching at the first non-word diff --git a/core/file_io.lua b/core/file_io.lua index af84390e..e1660161 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -113,7 +113,7 @@ function io.open_file(filenames) filenames = filenames or ui.dialogs.fileselect{ title = _L['Open'], select_multiple = true, with_directory = (buffer.filename or ''):match('^.+[/\\]') or - lfs.currentdir()..'/' + lfs.currentdir() } if not filenames then return end for i = 1, #filenames do diff --git a/core/ui.lua b/core/ui.lua index 28c7cef0..bb6f7e4f 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -274,7 +274,6 @@ local SETLEXERLANGUAGE = _SCINTILLA.properties.lexer_language[2] -- Sets default properties for a Scintilla document. events_connect(events.BUFFER_NEW, function() buffer.code_page = buffer.CP_UTF8 - buffer.style_bits = 8 buffer.lexer_language = 'lpeg' buffer:private_lexer_call(SETDIRECTFUNCTION, buffer.direct_function) buffer:private_lexer_call(SETDIRECTPOINTER, buffer.direct_pointer) diff --git a/modules/ansi_c/init.lua b/modules/ansi_c/init.lua index f9661ee7..bb1af31f 100644 --- a/modules/ansi_c/init.lua +++ b/modules/ansi_c/init.lua @@ -55,8 +55,8 @@ textadept.editing.autocompleters.ansi_c = function() local name = line:match('^%S+') if name:find(name_patt) and not name:find('^!') and not list[name] then local fields = line:match(';"\t(.*)$') - if (fields:match('class:(%S+)') or fields:match('enum:(%S+)') or - fields:match('struct:(%S+)') or fields:match('typedef:(%S+)') or + if (fields:find('class:%S+') or fields:find('enum:%S+') or + fields:find('struct:%S+') or fields:find('typedef:%S+') or '') == symbol then local k = xpms[fields:sub(1, 1)] list[#list + 1] = ("%s%s%d"):format(name, sep, xpms[k]) diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua index 6ad48981..b4f63458 100644 --- a/modules/textadept/command_entry.lua +++ b/modules/textadept/command_entry.lua @@ -186,7 +186,7 @@ end) --[[ The function below is a Lua C function. --- --- Opens the Lua command entry. +-- Opens the command entry. -- @class function -- @name focus local focus diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index 8aacfcb3..738a4c81 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -226,7 +226,7 @@ function M.find_in_files(dir) dir = dir or ui.dialogs.fileselect{ title = _L['Find in Files'], select_only_directories = true, with_directory = (buffer.filename or ''):match('^.+[/\\]') or - lfs.currentdir()..'/' + lfs.currentdir() } if not dir then return end |