From 922c95cf6711f80cbb6d3a16de98ac14a0ed6f66 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 10 Nov 2013 22:32:55 -0500 Subject: Disable strip trailing spaces by default. It's probably better to have users enable it manually than to do something unexpected. --- doc/08_Preferences.md | 6 +++--- modules/textadept/editing.lua | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/08_Preferences.md b/doc/08_Preferences.md index e4fbe4cf..f57e02ca 100644 --- a/doc/08_Preferences.md +++ b/doc/08_Preferences.md @@ -30,12 +30,12 @@ language modules. Many of Textadept's generic modules have configurable settings changeable from *~/.textadept/init.lua* after Textadept loads the module. The module's [LuaDoc][] lists these settings. For example, to disable character autopairing -with typeover and stripping trailing whitespace on save, add the following to -your *~/.textadept/init.lua*: +with typeover and strip trailing whitespace on save, add the +following to your *~/.textadept/init.lua*: textadept.editing.AUTOPAIR = false textadept.editing.TYPEOVER_CHARS = false - textadept.editing.STRIP_TRAILING_SPACES = false + textadept.editing.STRIP_TRAILING_SPACES = true To always hide the tab bar: diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index 1c957adf..7d585694 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -37,7 +37,7 @@ M.AUTOPAIR = true M.HIGHLIGHT_BRACES = true M.TYPEOVER_CHARS = true M.AUTOINDENT = true -M.STRIP_TRAILING_SPACES = true +M.STRIP_TRAILING_SPACES = false M.INDIC_BRACEMATCH = _SCINTILLA.next_indic_number() M.INDIC_HIGHLIGHT = _SCINTILLA.next_indic_number() @@ -372,8 +372,8 @@ function M.enclose(left, right) end --- --- Selects the text between strings *left* and *right* containing the caret. --- If already selected, toggles between selecting *left* and *right* too. +-- Selects the text between strings *left* and *right* containing the caret or, +-- if already selected, toggles between selecting *left* and *right* too. -- @param left The left part of the enclosure. -- @param right The right part of the enclosure. -- @name select_enclosed -- cgit v1.2.3