diff options
author | 2013-06-12 12:18:44 -0400 | |
---|---|---|
committer | 2013-06-12 12:18:44 -0400 | |
commit | 76bf447b66be5ffe6db007b7d97a0e9687d96e40 (patch) | |
tree | 7109169e46d52ef2ea14eea553a6849831be4ee3 | |
parent | 97a931b5dc1153f5ef8bc049bef0f064f8b278b0 (diff) | |
download | textadept-76bf447b66be5ffe6db007b7d97a0e9687d96e40.tar.gz textadept-76bf447b66be5ffe6db007b7d97a0e9687d96e40.zip |
Renamed editing module's `STRIP_WHITESPACE_ON_SAVE` to `STRIP_TRAILING_SPACES`.
-rw-r--r-- | doc/08_Preferences.md | 2 | ||||
-rw-r--r-- | modules/textadept/editing.lua | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/08_Preferences.md b/doc/08_Preferences.md index 2343b472..463c66c2 100644 --- a/doc/08_Preferences.md +++ b/doc/08_Preferences.md @@ -35,7 +35,7 @@ with typeover and stripping whitespace on save, add the following to your _M.textadept.editing.AUTOPAIR = false _M.textadept.editing.TYPEOVER_CHARS = false - _M.textadept.editing.STRIP_WHITESPACE_ON_SAVE = false + _M.textadept.editing.STRIP_TRAILING_SPACES = false Now suppose you want to load all of Textadept's default modules except for the menu. You cannot do this after-the-fact from *~/.textadept/init.lua*. Instead diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index aefb2eb4..b14ac849 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -24,7 +24,7 @@ local M = {} -- @field AUTOINDENT (bool) -- Match the indentation level of the previous line when inserting a new line. -- The default value is `true`. --- @field STRIP_WHITESPACE_ON_SAVE (bool) +-- @field STRIP_TRAILING_SPACES (bool) -- Strip trailing whitespace on file save. -- The default value is `true`. -- @field HIGHLIGHT_COLOR (string) @@ -36,7 +36,7 @@ M.AUTOPAIR = true M.HIGHLIGHT_BRACES = true M.TYPEOVER_CHARS = true M.AUTOINDENT = true -M.STRIP_WHITESPACE_ON_SAVE = true +M.STRIP_TRAILING_SPACES = true M.HIGHLIGHT_COLOR = not CURSES and 'color.orange' or 'color.yellow' --- @@ -160,7 +160,7 @@ end) -- Prepares the buffer for saving to a file. events.connect(events.FILE_BEFORE_SAVE, function() - if not M.STRIP_WHITESPACE_ON_SAVE then return end + if not M.STRIP_TRAILING_SPACES then return end local buffer = buffer buffer:begin_undo_action() -- Strip trailing whitespace. |