Skip to content

Commit

Permalink
[23_21] Ban jump in text/math at of graphics area
Browse files Browse the repository at this point in the history
  • Loading branch information
Oyyko committed Aug 10, 2023
1 parent 42ca0b7 commit 85ca390
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions TeXmacs/progs/graphics/graphics-kbd.scm
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@
(define (inside-graphics-context? t)
(tree-search-upwards t graphics-context?))

(define (inside-graphical-text-context? t)
(and-with p (tree-ref t :up)
(and-with u (tree-search-upwards p graphical-text-context?)
(inside-graphics-context? u))))

(tm-define (generic-context? t)
(:require (inside-graphics-context? t))
Expand Down Expand Up @@ -200,14 +196,12 @@
(tm-define (kbd-horizontal t forwards?)
(:require (graphical-text-context? t))
(with-define (move) ((if forwards? go-right go-left))
(with-define (next) (go-to-next-inside move inside-graphics-context?)
(go-to-next-such-that next inside-graphical-text-context?))))
(go-to-next-inside move (lambda (t2) (equal? t (tree-ref t2 :up))))))

(tm-define (kbd-vertical t downwards?)
(:require (graphical-text-context? t))
(with-define (move) ((if downwards? go-down go-up))
(with-define (next) (go-to-next-inside move inside-graphics-context?)
(go-to-next-such-that next inside-graphical-text-context?))))
(go-to-next-inside move (lambda (t2) (equal? t (tree-ref t2 :up))))))

(tm-define (kbd-extremal t forwards?)
(:require (graphical-text-context? t))
Expand Down

0 comments on commit 85ca390

Please sign in to comment.