From 57871e1b1f05ee2d87c07ed6e1bcb86d753f6a43 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+orbitalquark@users.noreply.github.com> Date: Thu, 22 Oct 2020 12:32:14 -0400 Subject: `textadept.editing.strip_trailing_spaces` should not apply to binary files. --- test/test.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test') diff --git a/test/test.lua b/test/test.lua index 047f6601..ee4cbd0f 100644 --- a/test/test.lua +++ b/test/test.lua @@ -1481,6 +1481,9 @@ function test_editing_strip_trailing_spaces() assert_equal(buffer.current_pos, buffer.line_end_position[2]) buffer:undo() assert_equal(buffer:get_text(), text) + buffer.encoding = nil -- treat as a binary file + events.emit(events.FILE_BEFORE_SAVE) + assert_equal(buffer:get_text(), text) buffer:close(true) textadept.editing.strip_trailing_spaces = strip -- restore end -- cgit v1.2.3