Dov Feldstern wrote:
Hi!

I have a cursor inside an inset. How can I easily get to the paragraph containing this inset? What I really want is to get to the character which represents the inset I'm in, so that I can get its font.

If you have access to the Cursor this information is in the previous CursorSlice. That is:

int current_slice_index = cur.depth() - 1;
CursorSlice const & previous_slice = cur[current_slice_index - 1];

pos_type char_previous_to_inset_pos = previous_slice.pos() - 1;

Abdel.

Reply via email to