From e6ab53619b329f0b68417cb9fab41086cd8f0174 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 28 Aug 2018 21:45:59 +0300 Subject: be more careful with adding semis --- crates/libeditor/src/typing.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/libeditor/src') diff --git a/crates/libeditor/src/typing.rs b/crates/libeditor/src/typing.rs index 952caf7f6..65a8933a4 100644 --- a/crates/libeditor/src/typing.rs +++ b/crates/libeditor/src/typing.rs @@ -65,6 +65,9 @@ pub fn on_eq_typed(file: &File, offset: TextUnit) -> Option { if contains_offset_nonstrict(expr_range, offset) && offset != expr_range.start() { return None; } + if file.syntax().text().slice(offset..expr_range.start()).contains('\n') { + return None; + } } else { return None; } -- cgit v1.2.3