From a2c68a927e8fbcb7d631aa08dd9bd4bc06c310e9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 4 Jan 2023 11:44:47 +0530 Subject: [PATCH] icat: When using --place ensure screen doesnt scroll by leaving cursor at top-left corner of image. --- kittens/icat/main.py | 3 ++- tools/cmd/icat/transmit.go | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/kittens/icat/main.py b/kittens/icat/main.py index f4cc8d7ef..fe2d273c3 100644 --- a/kittens/icat/main.py +++ b/kittens/icat/main.py @@ -48,7 +48,8 @@ into the specified rectangle. The syntax for specifying rectangles is All measurements are in cells (i.e. cursor positions) with the origin :italic:`(0, 0)` at the top-left corner of the screen. Note that the :option:`--align` option will horizontally align the image within this rectangle. By default, the image -is horizontally centered within the rectangle. +is horizontally centered within the rectangle. Using place will cause the cursor to +be positioned at the top left corner of the image, instead of on the line after the image. --scale-up diff --git a/tools/cmd/icat/transmit.go b/tools/cmd/icat/transmit.go index f325cbe2a..05be0b132 100644 --- a/tools/cmd/icat/transmit.go +++ b/tools/cmd/icat/transmit.go @@ -35,6 +35,9 @@ func gc_for_image(imgd *image_data, frame_num int, frame *image_frame) *graphics if z_index != 0 { gc.SetZIndex(z_index) } + if place != nil { + gc.SetCursorMovement(graphics.GRT_cursor_static) + } } else { gc.SetAction(graphics.GRT_action_frame) gc.SetGap(int32(frame.delay_ms))