Skip to content

Commit ee3dfa1

Browse files
authored
Merge pull request #3 from morganwillcock/narrow
Remove buffer restriction when writing temp file
2 parents 5d9cf0d + e9108d6 commit ee3dfa1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ This program is free software: you can redistribute it and/or modify it under th
4848

4949
This issue is a known bug in `ansible-lint`, not in `flymake-ansible-lint`.
5050

51-
It is `ansible-lint` that cuts off error messages:
51+
It is `ansible-lint` that truncates some error messages:
5252
```
5353
$ ansible-lint -p test.yaml
5454
test.yaml:5: yaml[truthy]: Truthy value should be one of

flymake-ansible-lint.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ Returns the path of the newly created temporary file."
259259
(file-exists-p temp-file-path)))
260260
(setq counter (1+ counter)))
261261
(unless (file-exists-p temp-file-path)
262-
(write-region (point-min) (point-max) temp-file-path nil 'quiet)
262+
(save-restriction
263+
(widen)
264+
(write-region (point-min) (point-max) temp-file-path nil 'quiet))
263265
temp-file-path))))
264266

265267
(flymake-ansible-lint--quickdef-backend flymake-ansible-lint-backend

0 commit comments

Comments
 (0)