krz/orgstar

A native macOS editor for org-mode files. editor org-mode swift

Commit 9c72646c0e

9c72646c0efeeff35e1bf9f39e6ca3b57facd45a

parent: 4ce0c2a1ce

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-08 04:09 UTC

Test screen-line gj in a plain buffer

gj in Org buffers is now the element motion.

Layout: unified · split

Tests/OrgEditorAppKitTests/ViewToggleTests.swift +4 −3
@@ -1,5 +1,6 @@
1import AppKit 1import AppKit
2import OrgCore 2import OrgCore
3import OrgDocument
3import Testing 4import Testing
4@testable import OrgEditorAppKit 5@testable import OrgEditorAppKit
5 6
@@ -44,9 +45,9 @@ struct ViewToggleTests {
44 45
45 @Test func gjMovesByScreenLines() { 46 @Test func gjMovesByScreenLines() {
46 let long = Array(repeating: "word", count: 60).joined(separator: " ") 47 let long = Array(repeating: "word", count: 60).joined(separator: " ")
47 let h = Harness(long + "\nnext\n") 48 // In Org files gj is evil-org's element motion; elsewhere it's screen lines.
48 // Doom binds `g j` to the next heading; without that binding it's the engine's. 49 let h = Harness(DocumentState(bytes: Array((long + "\nnext\n").utf8)), mode: .plain(language: nil))
49 h.editor.keymap = KeymapPreset.emacs.keymap 50 h.editor.keymap = KeymapPreset.doom.keymap
50 h.editor.modal = true 51 h.editor.modal = true
51 h.caret(at: 0) 52 h.caret(at: 0)
52 h.caret(at: 0) 53 h.caret(at: 0)