[Openmcl-devel] How do I move the cursor in a window under program control?
Ron Garret
ron at flownet.com
Thu Oct 16 18:51:12 PDT 2014
This is really driving me nuts. If I do this:
(setf b (hi:hemlock-view-buffer (ed)))
(let ((hi::*current-buffer* b))
(hi:insert-string (hi:buffer-point b)
"baz
bar
bing
"))
(hi:move-mark (hi:buffer-point b) (hi:buffer-start-mark b))
(let ((hi::*current-buffer* b)) (hi:insert-character (hi:buffer-point b) #\X))
The X gets inserted at the start of the buffer just as I would expect, but if I then click on the window the cursor is still at the end of the buffer, and if I type a character, that gets inserted at the end of the buffer.
(If I then call the last line again, I get another X at the beginning of the buffer, and the “bar” and “bing” lines disappear!)
So clearly moving the buffer point around is not the same as moving the cursor around. How do I move the cursor???
rg
On Oct 5, 2014, at 7:58 AM, Ron Garret <ron at flownet.com> wrote:
> This appears to be a regression. It works properly even without my patch in 1.8 but doesn’t work in 1.10. Apparently the problem is caused by some change deep in the GUI code because the code for editor-execute-expression-command and move-mark have not changed AFAICT.
>
> I’ve opened a ticket.
>
> On Oct 4, 2014, at 5:51 PM, Ron Garret <ron at flownet.com> wrote:
>
>> I want to move the cursor in the top listener to the end of the buffer. It seems like this should work but it doesn’t.
>>
>> (in-package :hemlock-interface)
>> (setf b (gui::hemlock-buffer (#/topListener gui::hemlock-listener-document)))
>> (move-mark (buffer-point b) (buffer-end-mark b))
>>
>> What I’m really trying to accomplish is to insure that the bottom of the top listener is visible after doing an eval-region in an editor window. This is supposed to happen automatically, but it has never worked. I had a patch that fixed this, but the patch stopped working in version 1.10.
>>
>> Thanks,
>> rg
>>
>> _______________________________________________
>> Openmcl-devel mailing list
>> Openmcl-devel at clozure.com
>> https://lists.clozure.com/mailman/listinfo/openmcl-devel
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel
More information about the Openmcl-devel
mailing list