57 Commits

Author SHA1 Message Date
Ingo Karkat f1ca678537 Merge branch 'release/1.10' into stable 1.10 2020-02-03 14:35:26 +01:00
Ingo Karkat b1bf27de70 Cosmetics: Delete changelogs 2020-02-03 13:43:47 +01:00
Ingo Karkat 6daaeae5ff Release 1.10 2020-02-03 13:42:19 +01:00
Ingo Karkat 424b77bec4 BUG: DeleteTrailingWhitespace_Action checks window-local instead of buffer-local override
This was meant to allow project- or file-specific overrides (e.g. via a localrc plugin). Having two windows showing the same buffer with different behavior doesn't make much sense.

Fixes #1.
2020-02-02 14:06:26 +01:00
Ingo Karkat 0dce6b97ae BUG: Regression: Mixed up recalled responses
Tragically, this way it would just do the exact opposite of what the user had asked :-( Fortunately, I only used the persistent recall for two files so far.
2019-06-14 16:30:20 +02:00
Ingo Karkat 58d5569fa3 Add Readme and gitignore 2019-02-10 18:36:58 +01:00
Ingo Karkat 1181d98b9c CHG: g:DeleteTrailingWhitespace_ChoiceAffectsHighlighting now is a List of possible responses that if missing will keep the highlighting for that particular response
CHG: Change default for g:DeleteTrailingWhitespace_Action from "abort" to "ask".
2019-02-10 18:32:49 +01:00
Ingo Karkat 496152531c Use special "... recalled" responses for lookups from persisted values
Add s:IsChoiceAffectsHighlighting(), pass it the current response, so that the switch can be made based on it.
2019-02-10 18:32:46 +01:00
Ingo Karkat 3b70fbf627 Documentation: Update changelog
- CHG: Make asking for action (instead of aborting) the default action, now
  that we offer many more choices, and the whole persistent recall of
  responses only works there. It's also more friendly and transparent towards
  first-time users of the plugin. To restore the original behavior: >
  let g:DeleteTrailingWhitespace_Action = 'abort'
- CHG: g:DeleteTrailingWhitespace_ChoiceAffectsHighlighting now is a List of
  possible responses that if missing will keep the highlighting for that
  particular response.
2019-02-10 18:32:42 +01:00
Ingo Karkat fae2cd09c5 Minor: Make substitute() robust against 'ignorecase' 2019-02-10 18:32:40 +01:00
Ingo Karkat 1bdffc0edc Documentation: Update changelog
- ENH: Add "Forever" and "Never ever" choices that persist the response for
  the current file across Vim session.
2019-02-10 18:32:37 +01:00
Ingo Karkat 6a9c03d38a Documentation: Update changelog
- ENH: If ShowTrailingWhitespace.vim (version 1.10 or higher) is installed,
  offer a "Never ever" choice that turns off highlighting for the current
  file persistently across Vim sessions.
- Add dependency to ingo-library (vimscript #4433).
  *** You need to separately install ingo-library (vimscript #4433) version
  1.036 (or higher)! ***
2019-02-10 18:32:34 +01:00
Ingo Karkat f31caa7582 Change "Never ever" to "Never ever highlight" to be more precise what's happening
Add "Forever" and "Never ever" choices that persist the response for the current file across Vim session.
2019-02-10 18:32:30 +01:00
Ingo Karkat 5b052f14a1 Change "Never ever" to "Never ever highlight or delete" to be more precise what's happening 2019-02-10 18:32:26 +01:00
Ingo Karkat 2a6e704c84 Use ingo-library's ingo#plugin#setting#GetBufferLocal()
DeleteTrailingWhitespace#Get() and make DeleteTrailingWhitespace#GetAction() script-local. Use ingo#query#ConfirmAsText() to be able to replace the choice numbers with the actual chosen text.
ENH: Add "Never ever" choice that leverages ShowTrailingWhitespace.vim's new persistence feature.
2019-02-10 18:32:23 +01:00
Ingo Karkat f1bf235c43 2019-02-10 18:32:18 +01:00
Ingo Karkat 5cb503d00f 2019-02-10 18:32:18 +01:00
Ingo Karkat c1626adf0f 2019-02-10 18:32:18 +01:00
Ingo Karkat 90fb752457 FIX: Warning for nomodifiable buffer does not consider buffer-local b:DeleteTrailingWhitespace_Action 2019-02-10 18:32:16 +01:00
Ingo Karkat a221f34f31 2019-02-10 18:32:16 +01:00
Ingo Karkat f09695d530 file creation 2019-02-10 18:32:16 +01:00
Ingo Karkat 7af38be650 2019-02-10 18:32:16 +01:00
Ingo Karkat bd4768a4d9 Documentation: Update changelog
- FIX: Warning for nomodifiable buffer does not consider buffer-local
  b:DeleteTrailingWhitespace_Action (after version 1.05).
2019-02-10 18:32:13 +01:00
Ingo Karkat 4eb66acdd8 2019-02-10 18:32:13 +01:00
Ingo Karkat e13d4fc96b Corner case: Avoid "E21: Cannot make changes, 'modifiable' is off" on a nomodifiable buffer when g:DeleteTrailingWhitespace_Action = 'delete', and instead just show a warning 2019-02-10 18:32:02 +01:00
Ingo Karkat b21dfcbaaf Documentation: Update changelog
- Corner case: Avoid "E21: Cannot make changes, 'modifiable' is off" on a
  nomodifiable buffer when g:DeleteTrailingWhitespace_Action = 'delete', and
  instead just show a warning. Thanks to Enno Nagel for raising this issue.
2019-02-10 18:31:59 +01:00
Ingo Karkat 31d515478e 2019-02-10 18:31:54 +01:00
Ingo Karkat 52c068073f Handle local exception regular expressions that contain a "/" character
This must be escaped for the :substitute/ command.
2019-02-10 18:31:51 +01:00
Ingo Karkat 7d36f1dca4 2019-02-10 18:31:51 +01:00
Ingo Karkat dabdd4f350 Documentation: Update changelog
- Handle local exception regular expressions that contain a "/" character.
  This must be escaped for the :substitute/ command.
2019-02-10 18:31:48 +01:00
Ingo Karkat 9f29ec50ce Documentation: Update changelog
- Minor: Make substitute() robust against 'ignorecase'.
- Minor: Correct lnum for no-modifiable buffer check.
2019-02-10 18:31:45 +01:00
Ingo Karkat 7df2907bae Minor: Change error message wording slightly to be more consistent with Vim's original 2019-02-10 18:31:42 +01:00
Ingo Karkat bf9d1e6220 FIX: Avoid polluting search history 2019-02-10 18:31:39 +01:00
Ingo Karkat b13d8f8767 Minor: Correct lnum for no-modifiable buffer check 2019-02-10 18:31:36 +01:00
Ingo Karkat ac5828c52c 2019-02-10 18:31:31 +01:00
Ingo Karkat 34a390fca6 2019-02-10 18:31:31 +01:00
Ingo Karkat 65f8d2244b Handle readonly and nomodifiable buffers by printing just the warning / error, without the multi-line function error 2019-02-10 18:31:28 +01:00
Ingo Karkat e1a889c6d3 Documentation: Update changelog
Handle readonly and nomodifiable buffers by printing just the warning / error,
without the multi-line function error.
2019-02-10 18:31:25 +01:00
Ingo Karkat 9c18fd9032 Define command with -bar so that it can be chained 2019-02-10 18:31:22 +01:00
Ingo Karkat bfe127bbe4 Documentation: Update changelog
FIX: Avoid polluting search history.
2019-02-10 18:31:19 +01:00
Ingo Karkat 5941148592 Documentation: Update changelog
Define command with -bar so that it can be chained.
2019-02-10 18:31:16 +01:00
Ingo Karkat 94fc700a18 Support turning off highlighting of trailing 2019-02-10 18:31:14 +01:00
Ingo Karkat 11b7353d7e Support turning off highlighting of trailing 2019-02-10 18:31:11 +01:00
Ingo Karkat daf01fa91a 2019-02-10 18:31:11 +01:00
Ingo Karkat 544e9193e6 2019-02-10 18:31:11 +01:00
Ingo Karkat 81f63408da Support turning off highlighting of trailing whitespace when the user answers the query with "Never" or "Nowhere" 2019-02-10 18:31:08 +01:00
Ingo Karkat 3998330b8e 2019-02-10 18:31:08 +01:00
Ingo Karkat aae4dc56bc Support turning off highlighting of trailing whitespace when the user answers the query with "Never" or "Nowhere" 2019-02-10 18:30:59 +01:00
Ingo Karkat a3f4551967 2019-02-10 18:30:59 +01:00
Ingo Karkat 7730ea7d1e 2019-02-10 18:30:59 +01:00