Thanks for the reports, Helge. I am answering to both of your mails here, 
because I have a patch which fixes some of the issues.

Helge Hafting wrote:
> * select cells, press C-M for math. Crash! ÂNo, I don't see how this
> Â Âcould be useful, so ignoring operations on selections when
> Â Âthe current selection doesn't fit the operation would be fine here.

Yes, we forgot this. The attached patch includes it.

> * select cells, insert a table. I got a new 4x4 table inside the
> Â cell containing the cursor. ÂAll the cells in the selection had
> Â their contents erased though - this was not expected.

Right. It's a regression wrt 1.3. Please file a bug report.

> Â I also noticed that selecting some normal text (not in a table)
> Â and inserting a table erases the selected text, there is no
> Â attempt to get it into the table. ÂThis makes more sense,
> Â the selection is replaced by the table. ÂGetting the text
> Â into the table (using some space-separated or comma-
> Â separated heuristic) might be nice and useful, but I guess this
> Â isn't the time for new features?

I cannot reproduce. When I select some text outside a table and insert a table 
over the selection, the text gets inserted in the first cell (as in 1.3)

<second mail>:
> Table navigation
> ===========
> * Pressing tab or shift-tab in a table cell does nothing.  Moving
>    to the next/previous table cell was expected, it is nice and
>    quick to be able to jump out of a (long) cell text directly to
>    the next cell.

LFUN_NEXT is currently commented out in insettabular.C. We have to bring it 
back before 1.4. Please file a bug report.

> * Pressing C-rightarrow (or leftarrow) jumps whole words
>    at a time, for speedy navigation.  Unfortunately the cursor
>    won't go to the next table cell, I have to release the control key.
>    It'd be nice to jump to the next cell with C-arrows too.

Right, but no regression (the same in 1.3). I think it'll have to wait.

> * Exiting a table cell with left arrow moves to the previous
>    cell.  But it moves to the start of the cell, I expected to get
>    to the end of the cell. This makes a difference when there
>    is long text in the cells.

Regression. Fixed by
-  cur.pit() = 0;
-  cur.pos() = 0;
+ cur.pit() = cur.lastpit();
+ cur.pos() = cur.lastpos();
in InsetTabular::movePrevCell
(see patch).

> * Using up & down arrows in a table is strange.
>    If the cursor is in the middle of long text in one cell, then
>    I expect it to get it to somewhere in the middle of the text
>   in the cell above/below. This works, but in a strange cumbersome way:
>   At first keypress, the cursor moves to the correct cell, but
>   to the beginning or the end depending on wether it was a
>   down or up key.  Odd. The next keypress gets the cursor into
>   the location I expected!  Cumbersome because it is twice as
>   many keypresses.  Seems the functionality I look for exists though.

No regression, though probably easily fixable.

Can you please test if the attached patch fixes the things I have promised and 
if there are no regressions introduced by the patch?

Thanks,
JÃrgen
Index: insettabular.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettabular.C,v
retrieving revision 1.455
diff -u -r1.455 insettabular.C
--- insettabular.C	13 Mar 2005 10:36:41 -0000	1.455
+++ insettabular.C	14 Mar 2005 11:55:23 -0000
@@ -724,14 +724,23 @@
 		cell(cur.idx())->dispatch(cur, cmd);
 		break;
 
-        case LFUN_EMPH:
-        case LFUN_BOLD:
-        case LFUN_ROMAN:
-        case LFUN_NOUN:
-        case LFUN_ITAL:
-        case LFUN_FRAK:
-        case LFUN_CODE:
-        case LFUN_SANS:
+	case LFUN_EMPH:
+	case LFUN_BOLD:
+	case LFUN_ROMAN:
+	case LFUN_NOUN:
+	case LFUN_ITAL:
+	case LFUN_FRAK:
+	case LFUN_CODE:
+	case LFUN_SANS:
+	case LFUN_FREEFONT_APPLY:
+	case LFUN_FREEFONT_UPDATE:
+	case LFUN_FONT_SIZE:
+	case LFUN_UNDERLINE:
+	case LFUN_LANGUAGE:
+	case LFUN_CAPITALIZE_WORD:
+	case LFUN_UPCASE_WORD:
+	case LFUN_LOWCASE_WORD:
+	case LFUN_TRANSPOSE_CHARS:
 		if (tablemode(cur)) {
 			row_type rs, re;
 			col_type cs, ce;
@@ -952,6 +961,10 @@
 	case LFUN_INSET_WIDE_FLOAT:
 	case LFUN_INSET_FOOTNOTE:
 	case LFUN_INSET_MARGINAL:
+	case LFUN_INSERT_MATH:
+	case LFUN_MATH_MODE:
+	case LFUN_MATH_MUTATE:
+	case LFUN_MATH_DISPLAY:
 	case LFUN_INSERT_NOTE:
 	case LFUN_INSET_OPTARG:
 	case LFUN_INSERT_BOX:
@@ -1231,8 +1244,8 @@
 			return;
 		--cur.idx();
 	}
-	cur.pit() = 0;
-	cur.pos() = 0;
+	cur.pit() = cur.lastpit();
+	cur.pos() = cur.lastpos();
 	resetPos(cur);
 }
 

Reply via email to