- Subject: Re: JWindows->Mark and bug
- From: Jörg Sommer <joerg@xxxxxxxxxxxx>
- Date: Mon, 10 Sep 2007 10:38:04 +0000 (UTC)
Hallo John,
"John E. Davis" <davis@xxxxxxxxxxxxx> wrote:
> =?UTF-8?Q?J=C3=B6rg?= Sommer <joerg@xxxxxxxxxxxx> wrote:
>>what's the meaning of JWindow->Mark and where is it different from the
>>fields of JWindow->buffer? Where is it used?
>
> The purpose of the mark is to store the editing position of a buffer
> as displayed in that window. Multiple windows can contain the same
> buffer and can have window-specific editing positions.
Ahh. You've enlighten me. :)
>>I think the problem is in window.c:other_window(). The mark that was
>>restored by switch_to_buffer() gets overwritten by jed_goto_mark(). The
>>editing point in the buffer does never change, because down() and
>>insert_char() do not change JWindow->mark, but this is restored by
>>other_window().
>
> There are two buffer-changing functions: setbuf and sw2buf.
But both with the same problem. If I use sw2buf instead of setbuf, the
same happens. I must use otherwindow() to change the mark in JWindow.
> The sw2buf function changes to the specified buffer and attaches that
> buffer to the current window. The setbuf function only switches
> buffers-- it does not change the buffer attached to the window. After
> your function ran, control passed back to jed's editing loop. Since
> you used setbuf, the cursor position was restored to the window's
> value. As a result, you did not see the cursor move, although your
> function moved it.
This explains why it's not possible to look at the *traceback* buffer
while it get's filled and stack_check clutters the buffer if it's
visible while it writes to it.
> From the code, it looks like you are trying to move a selection from
> one line to another.
Yes and no. I move a mark, but it might not be the whole line.
Sometimes it's ony a mark for some characters.
Schöne Grüße, Jörg.
--
> Ich kenn mich mit OpenBSD kaum aus, was sind denn da so die
> Vorteile gegenueber Linux und iptables?
Der Fuchsschwanzeffekt ist größer. :->
Message-ID: <slrnb11064.54g.hschlen@xxxxxxxxxxxxxxxx>
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2007 date index]
[2007 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]