浏览代码

don't reset caret position to 0 on save

andreas muelder 7 年之前
父节点
当前提交
ecdaec8d1f

+ 2 - 1
plugins/org.yakindu.base.xtext.utils.jface/src/org/yakindu/base/xtext/utils/jface/viewers/StyledTextXtextAdapter.java

@@ -417,7 +417,8 @@ public class StyledTextXtextAdapter {
 				this.site.setSelectionProvider(this.selectionProviderOnFocusLost);
 			}
 
-			text.setSelection(0);
+			text.setSelection(text.getCaretOffset());
+			
 		}
 
 		protected void setIgnoreNextFocusLost(boolean b) {