gnodet-bot commented on code in PR #27296:
URL: https://github.com/apache/camel/pull/27296#discussion_r4168322269


##########
dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SourceViewer.java:
##########
@@ -1223,6 +1228,29 @@ private void exitEditMode() {
             markdownMode = markdownModeBeforeEdit;
         }
         markdownModeBeforeEdit = false;
+        editStartTop = -1;
+        if (wasEditing) {
+            keepEditorPosition(cursorRow, top);
+        }
+    }
+
+    /**
+     * The view continues where the editor was: the cursor line is selected 
and the same line is at the top, so leaving
+     * the editor does not move the code on the screen.
+     */
+    /** The top line the editor opens on: the top line of the view, moved only 
as far as the cursor must stay seen. */

Review Comment:
   💡 **Nit:** Two consecutive Javadoc blocks — the first one describes 
`keepEditorPosition` (below) but is orphaned here above 
`editorTopKeepingCursor`. The compiler attaches only the second `/** */` to the 
method. Move the first Javadoc down to `keepEditorPosition`:
   
   ```suggestion
       /**
        * The top line the editor opens on: the top line of the view, moved 
only as far as the cursor must stay seen.
        */
   ```
   
   Then above `keepEditorPosition` (line 1247):
   ```java
       /**
        * The view continues where the editor was: the cursor line is selected 
and the same line is at the top, so leaving
        * the editor does not move the code on the screen.
        */
   ```



-- 
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