diff options
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | core/locale.conf | 1 | ||||
-rw-r--r-- | core/locales/locale.de.conf | 1 | ||||
-rw-r--r-- | core/locales/locale.es.conf | 1 | ||||
-rw-r--r-- | core/locales/locale.fr.conf | 1 | ||||
-rw-r--r-- | core/locales/locale.ru.conf | 1 | ||||
-rw-r--r-- | core/locales/locale.sv.conf | 1 | ||||
-rw-r--r-- | modules/textadept/editing.lua | 23 | ||||
-rw-r--r-- | modules/textadept/keys.lua | 8 | ||||
-rw-r--r-- | modules/textadept/menu.lua | 1 |
10 files changed, 4 insertions, 37 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 81ae9bd5..03925900 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2649,7 +2649,7 @@ Download: Bugfixes: -* Fixed bug in editing module's [`select_indented_block()`][]. +* Fixed bug in editing module's `select_indented_block()`. * Fixed empty [`buffer.filename`][] bug in `textadept.io.save_as()`. * Fixed setting of Ruby lexer after detecting filetype. @@ -2664,7 +2664,6 @@ Updates: * Fixed some code redundancy and typos in documentation. [Textadept 0.3 -- Linux]: download/ta_beta_r3.tgz -[`select_indented_block()`]: api/textadept.editing.html#select_indented_block [`buffer.filename`]: api/buffer.html#filename [Zenity]: http://live.gnome.org/Zenity [lua_dialog]: http://luaforge.net/projects/lua-dialog diff --git a/core/locale.conf b/core/locale.conf index 33a5ca56..ffd0e54b 100644 --- a/core/locale.conf +++ b/core/locale.conf @@ -148,7 +148,6 @@ Select in B_races = Select in B_races Select _Word = Select _Word Select _Line = Select _Line Select Para_graph = Select Para_graph -Select _Indented Block = Select _Indented Block Selectio_n = Selectio_n _Upper Case Selection = _Upper Case Selection _Lower Case Selection = _Lower Case Selection diff --git a/core/locales/locale.de.conf b/core/locales/locale.de.conf index cd21a8ae..e7727c0a 100644 --- a/core/locales/locale.de.conf +++ b/core/locales/locale.de.conf @@ -138,7 +138,6 @@ Select in B_races = In geschweiften Klammern markieren Select _Word = Wort markieren Select _Line = Zeile markieren Select Para_graph = Absatz markieren -Select _Indented Block = Eingerückten Block markieren Selectio_n = Markierung _Upper Case Selection = Markierung in Großbuchstaben umwandeln _Lower Case Selection = Markierung in Kleinbuchstaben umwandeln diff --git a/core/locales/locale.es.conf b/core/locales/locale.es.conf index 0db6ca85..39356340 100644 --- a/core/locales/locale.es.conf +++ b/core/locales/locale.es.conf @@ -149,7 +149,6 @@ Select in B_races = Seleccionar entre _llaves Select _Word = Seleccionar pala_bra Select _Line = Seleccionar l_ínea Select Para_graph = Seleccionar párra_fo -Select _Indented Block = Seleccionar blo_que indentado Selectio_n = Sele_cción _Upper Case Selection = _Selección a mayúsculas _Lower Case Selection = S_eleccion a minúsculas diff --git a/core/locales/locale.fr.conf b/core/locales/locale.fr.conf index 67dc23d6..2500a707 100644 --- a/core/locales/locale.fr.conf +++ b/core/locales/locale.fr.conf @@ -149,7 +149,6 @@ Select in B_races = Sélectionner entre accola_des Select _Word = Sélectionner _mot Select _Line = Sélectionner _ligne Select Para_graph = Sélectionner parag_raphe -Select _Indented Block = Sélectionner _bloc indenté Selectio_n = Sélectio_n _Upper Case Selection = _Mettre en majuscules _Lower Case Selection = _Mettre en minuscules diff --git a/core/locales/locale.ru.conf b/core/locales/locale.ru.conf index bab49f39..e2bd051a 100644 --- a/core/locales/locale.ru.conf +++ b/core/locales/locale.ru.conf @@ -138,7 +138,6 @@ Select in B_races = Веделить в _фигурных скобках Select _Word = Выделить с_лово Select _Line = Выделить ст_року Select Para_graph = Выделить _параграф -Select _Indented Block = Выделить блок с _отступом Selectio_n = Выдел_ение _Upper Case Selection = Преобразовать выделение в _верхний регист _Lower Case Selection = Преобразовать выделение в _нижний регистр diff --git a/core/locales/locale.sv.conf b/core/locales/locale.sv.conf index 18588458..14e60f87 100644 --- a/core/locales/locale.sv.conf +++ b/core/locales/locale.sv.conf @@ -150,7 +150,6 @@ Select in B_races = Markera inom _krullparenteser Select _Word = Markera _ord Select _Line = Markera _rad Select Para_graph = Markera para_graf -Select _Indented Block = Markera _indenterat block Selectio_n = Markeri_ng _Upper Case Selection = Gör till _stora bokstäver _Lower Case Selection = Gör till s_må bokstäver diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index c67542ba..d5d78ac6 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -406,29 +406,6 @@ function M.select_paragraph() end --- --- Selects the surrounding block of text whose lines' indentation levels are --- greater than or equal to the current line's level. --- If a text block is selected and the lines immediately above and below it are --- one indentation level lower, adds those lines to the selection. --- @name select_indented_block -function M.select_indented_block() - local buffer = buffer - local s = buffer:line_from_position(buffer.selection_start) - local e = buffer:line_from_position(buffer.selection_end) - local indent = buffer.line_indentation[s] - buffer.tab_width - if indent < 0 then return end - if buffer:get_sel_text() ~= '' and - buffer.line_indentation[s - 1] == indent and - buffer.line_indentation[e + 1] == indent then - s, e, indent = s - 1, e + 1, indent + buffer.tab_width - end - while buffer.line_indentation[s - 1] > indent do s = s - 1 end - while buffer.line_indentation[e + 1] > indent do e = e + 1 end - s, e = buffer:position_from_line(s), buffer.line_end_position[e] - buffer:set_sel(s, e) -end - ---- -- Converts indentation between tabs and spaces according to `buffer.use_tabs`. -- If `buffer.use_tabs` is `true`, `buffer.tab_width` indenting spaces are -- converted to tabs. Otherwise, all indenting tabs are converted to diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua index c7689605..8e90e644 100644 --- a/modules/textadept/keys.lua +++ b/modules/textadept/keys.lua @@ -53,7 +53,6 @@ local M = {} -- Ctrl+Shift+D |⌘⇧D |M-S-W |Select word -- Ctrl+Shift+N |⌘⇧N |M-S-N |Select line -- Ctrl+Shift+P |⌘⇧P |M-S-P |Select paragraph --- Ctrl+Shift+I |⌘⇧I |M-S-I |Select indented block -- Ctrl+Alt+U |^U |M-^U |Upper case selection -- Ctrl+Alt+Shift+U |^⇧U |M-^L |Lower case selection -- Alt+< |^< |M-> |Enclose as XML tags @@ -310,7 +309,7 @@ for _, f in ipairs(menu_buffer_functions) do buffer[f] = buffer[f] end -- Windows and Linux key bindings. -- -- Unassigned keys (~ denotes keys reserved by the operating system): --- c: A C H p Q T ~ V Y _ ) ] } + +-- c: A C H I p Q T ~ V Y _ ) ] } + -- a: aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ_ ) ] } *+-/=\n\s -- ca: aAbBcCdD F jJkKlLmM N qQ t xXy zZ_"'()[]{}<>* / \s -- @@ -325,7 +324,7 @@ for _, f in ipairs(menu_buffer_functions) do buffer[f] = buffer[f] end -- Mac OSX key bindings. -- -- Unassigned keys (~ denotes keys reserved by the operating system): --- m: A C ~ JkK ~M p ~ tT U V yY _ ) ] } + ~~\n +-- m: A C ~ I JkK ~M p ~ tT U V yY _ ) ] } + ~~\n -- c: cC D gG H J K L oO qQ xXyYzZ_ ) ] } * / -- cm: aAbBcC~D F ~HiIjJkKlL~MnN p q~rRsStTuUvVwWxXyYzZ_"'()[]{}<>*+-/=\t\n -- @@ -353,7 +352,7 @@ for _, f in ipairs(menu_buffer_functions) do buffer[f] = buffer[f] end -- Unassigned keys (~ denotes keys reserved by the operating system): -- c: g~~ ~ -- cm: cd g~~ k ~ q t xyz --- m: e J qQ sS u vVw yYzZ_ + +-- m: e I J qQ sS u vVw yYzZ_ + -- Note: m[befhstv] may be used by Linux/BSD GUI terminals for menu access. -- -- CTRL = 'c' (Control ^) @@ -421,7 +420,6 @@ keys[not OSX and not CURSES and 'c{' keys[not OSX and (not CURSES and 'cD' or 'mW') or 'mD'] = editing.select_word keys[not OSX and not CURSES and 'cN' or 'mN'] = editing.select_line keys[not OSX and not CURSES and 'cP' or 'mP'] = editing.select_paragraph -keys[not OSX and not CURSES and 'cI' or 'mI'] = editing.select_indented_block -- Selection. keys[not OSX and (not CURSES and 'cau' or 'cmu') or 'cu'] = buffer.upper_case keys[not OSX and (not CURSES and 'caU' or 'cml') or 'cU'] = buffer.lower_case diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua index 4aac1eff..55cf7ee6 100644 --- a/modules/textadept/menu.lua +++ b/modules/textadept/menu.lua @@ -65,7 +65,6 @@ local menubar = { {_L['Select _Word'], editing.select_word}, {_L['Select _Line'], editing.select_line}, {_L['Select Para_graph'], editing.select_paragraph}, - {_L['Select _Indented Block'], editing.select_indented_block}, }, { title = _L['Selectio_n'], {_L['_Upper Case Selection'], buffer.upper_case}, |