[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Texmacs-dev] Understanding paths
From: |
skhilji |
Subject: |
[Texmacs-dev] Understanding paths |
Date: |
Fri, 30 Apr 2004 16:18:12 -0400 |
I type the following:
<\body>
This is a simple test <strong|with some strong text>. This is a simple test
This is a simple test.\
This line does not have any special content tags. This line does not have
any special content tags. This line does not have any special content tags.
</body>
Then I did print_tree() on the edit tree. After manually annotating it, here
it is:
document
(0)concat
(0)(STRING) This is a simple test
(1)strong
(STRING) with some strong text
(2)(STRING) . This is a simple test. This is a simple test. This is a
simple test. This is a simple test. This is a simple test. This is a simple
test.
(1)(STRING) This line does not have any special content tags. This line does
not have any special content tags. This line does not have any special content
tags. This line does not have any special content tags. This line does not
have any special content tags.
After puting some code in edit_cursor_rep::cursor_move (SI dx, SI dy) to cout
the cursor position, run the following experiment:
Put the cursor right after the word "STRONG" in the first paragraph in the
TeXmacs window. After the right arrow key, TeXmacs displays:
Cursor Position: [ 0, 1, 0, 17 ]
Looking at the edit tree, I would have expected [ 0, 1, 17 ] i.e only 3 items
in the path. I don't understand how we end up with 4 elements in the tree.
Another thing:
1) Put the cursor right after the strong word "TEXT". Hit the right arrow
key. TeXmacs displays: Cursor Position: [ 0, 1, 1 ]. I would have expected [
0, 2, 0 ]. We can never have the cursor at [0, 2, 0]. TeXmacs always begins
at [0, 2, 1].
I have read the developers docs where it mentions about a ghost cursor. From
what I see above, it seems like there is a "ghost" edit tree item after the
line:
(1)strong
(STRING) with some strong text
in the edit tree. i.e. the edit tree looks like:
(1)strong
(STRING) with some strong text
<<GHOST>>
Can someone please elaborate on it a little more to clear it up.
Salman
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Texmacs-dev] Understanding paths,
skhilji <=