dididy commented on code in PR #5057:
URL: https://github.com/apache/zeppelin/pull/5057#discussion_r2319039205


##########
zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts:
##########
@@ -225,6 +253,10 @@ export class NotebookParagraphCodeEditorComponent 
implements OnChanges, OnDestro
       }
     }
     if (focus) {
+      if (!focus.currentValue && this.editor) {
+        this.position = this.editor.getPosition();
+        return;
+      }

Review Comment:
   7ef077a
   
   This code is used to save the current cursor position. The reason it’s 
needed is that after running **Run all above** or **Run all below**, the cursor 
position must be remembered when focus returns. Looking back, I realize I 
didn’t pay close enough attention at the time, and it wasn’t working as 
intended. So, I revised it in the above commit to use 
`editor.onDidChangeCursorPosition()` instead.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to