The Unified and Autonomous Development Platform
Fix the issue of not being able to positioning search result while edit file sometimes.
robin shinec1c0c159d51d
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/depotfile/fileedit/file-edit.js b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/depotfile/fileedit/file-edit.jsindex 956e52ce02..c68d49a247 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/depotfile/fileedit/file-edit.js+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/depotfile/fileedit/file-edit.js@@ -129,11 +129,7 @@ gitplex.fileedit = {if (oldLine == beginLine && oldChar == beginChar) {newBeginLine = newLine;newBeginChar = newChar;- } else if (oldLine == endLine && oldChar == endChar) {- newEndLine = newLine;- newEndChar = newChar;}-if (char == '\n') {oldLine++;oldChar = 0;@@ -143,16 +139,22 @@ gitplex.fileedit = {oldChar++;newChar++;}+ if (oldLine == endLine && oldChar == endChar) {+ newEndLine = newLine;+ newEndChar = newChar;+ }}- if (oldLine>beginLine && !newBeginLine || oldLine>endLine) {- quite = true;+ if (oldLine>beginLine && newBeginLine==undefined || oldLine>endLine) {+ quit = true;break;}}+ if (quit)+ break;}}- if (newBeginLine && newEndLine) {+ if (newBeginLine!=undefined && newEndLine!=undefined) {var newMark = {beginLine: newBeginLine,beginChar: newBeginChar,