mirror of
https://github.com/vale981/apheleia
synced 2025-03-04 17:11:40 -05:00
Ignore narrowed buffers (#127)
Fixes #124 Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com> Co-authored-by: Radon Rosborough <radon.neon@gmail.com>
This commit is contained in:
parent
4555ace65b
commit
8ff45766fa
2 changed files with 8 additions and 1 deletions
|
@ -17,6 +17,10 @@ The format is based on [Keep a Changelog].
|
|||
(e.g. scalafmt), do not erase the buffer ([#116]).
|
||||
* Fix `Error: "Selecting deleted buffer"` which occurred in some
|
||||
circumstances due to a race condition ([#123]).
|
||||
* Apheleia does not delete the contents of narrowed buffers when
|
||||
running. Instead, it is disabled in narrowed buffers. Support for
|
||||
narrowed buffers may be added in future but it has never been
|
||||
correctly supported in the past (see [#43]). More at [#124], [#127].
|
||||
|
||||
### Formatters
|
||||
* [elm-format](https://github.com/avh4/elm-format) for Elm ([#100]).
|
||||
|
@ -25,6 +29,7 @@ The format is based on [Keep a Changelog].
|
|||
* [stylua](https://github.com/JohnnyMorganz/StyLua) for Lua ([#105]).
|
||||
* Native Emacs indentation of Emacs Lisp code as a formatter ([#102]).
|
||||
|
||||
[#43]: https://github.com/radian-software/apheleia/issues/43
|
||||
[#100]: https://github.com/radian-software/apheleia/pull/100
|
||||
[#101]: https://github.com/radian-software/apheleia/pull/101
|
||||
[#102]: https://github.com/radian-software/apheleia/pull/102
|
||||
|
@ -34,7 +39,9 @@ The format is based on [Keep a Changelog].
|
|||
[#116]: https://github.com/radian-software/apheleia/pull/116
|
||||
[#119]: https://github.com/radian-software/apheleia/pull/119
|
||||
[#123]: https://github.com/radian-software/apheleia/issues/123
|
||||
[#124]: https://github.com/radian-software/apheleia/issues/124
|
||||
[#125]: https://github.com/radian-software/apheleia/pull/125
|
||||
[#127]: https://github.com/radian-software/apheleia/pull/127
|
||||
|
||||
## 3.0 (released 2022-06-01)
|
||||
### Breaking changes
|
||||
|
|
|
@ -1291,7 +1291,7 @@ operating, to prevent an infinite loop.")
|
|||
(defun apheleia--format-after-save ()
|
||||
"Run code formatter for current buffer if any configured, then save."
|
||||
(unless apheleia--format-after-save-in-progress
|
||||
(when apheleia-mode
|
||||
(when (and apheleia-mode (not (buffer-narrowed-p)))
|
||||
(when-let ((formatters (apheleia--get-formatters)))
|
||||
(apheleia-format-buffer
|
||||
formatters
|
||||
|
|
Loading…
Add table
Reference in a new issue