Commit 79fc97fb authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg
Browse files

dont highlight ranges on other sheets. (scan_at) : simplify.


2001-02-22  Jody Goldberg <jgoldberg@home.com>

	* src/item-edit.c (point_is_inside_range) : dont highlight ranges on
	  other sheets.
	(scan_at) : simplify.

	* src/workbook-control-gui.c (cb_notebook_switch_page) : If we are
	  only switching pages to select a range there is no need to update
	  anything.
parent 78ab04fc
2001-02-22 Jody Goldberg <jgoldberg@home.com>
* src/item-edit.c (point_is_inside_range) : dont highlight ranges on
other sheets.
(scan_at) : simplify.
* src/workbook-control-gui.c (cb_notebook_switch_page) : If we are
only switching pages to select a range there is no need to update
anything.
* src/expr.c (eval_expr_real) : fix old typo.
* src/commands.c (cmd_unmerge_cells_init) : add simple test to avoid
......
2001-02-22 Jody Goldberg <jgoldberg@home.com>
* src/item-edit.c (point_is_inside_range) : dont highlight ranges on
other sheets.
(scan_at) : simplify.
* src/workbook-control-gui.c (cb_notebook_switch_page) : If we are
only switching pages to select a range there is no need to update
anything.
* src/expr.c (eval_expr_real) : fix old typo.
* src/commands.c (cmd_unmerge_cells_init) : add simple test to avoid
......
2001-02-22 Jody Goldberg <jgoldberg@home.com>
* src/item-edit.c (point_is_inside_range) : dont highlight ranges on
other sheets.
(scan_at) : simplify.
* src/workbook-control-gui.c (cb_notebook_switch_page) : If we are
only switching pages to select a range there is no need to update
anything.
* src/expr.c (eval_expr_real) : fix old typo.
* src/commands.c (cmd_unmerge_cells_init) : add simple test to avoid
......
2001-02-22 Jody Goldberg <jgoldberg@home.com>
* src/item-edit.c (point_is_inside_range) : dont highlight ranges on
other sheets.
(scan_at) : simplify.
* src/workbook-control-gui.c (cb_notebook_switch_page) : If we are
only switching pages to select a range there is no need to update
anything.
* src/expr.c (eval_expr_real) : fix old typo.
* src/commands.c (cmd_unmerge_cells_init) : add simple test to avoid
......
2001-02-22 Jody Goldberg <jgoldberg@home.com>
* src/item-edit.c (point_is_inside_range) : dont highlight ranges on
other sheets.
(scan_at) : simplify.
* src/workbook-control-gui.c (cb_notebook_switch_page) : If we are
only switching pages to select a range there is no need to update
anything.
* src/expr.c (eval_expr_real) : fix old typo.
* src/commands.c (cmd_unmerge_cells_init) : add simple test to avoid
......
......@@ -46,15 +46,14 @@ enum {
static void
scan_at (const char *text, int *scan)
{
while (*scan > 0){
const char *p = &text [(*scan)-1];
char c = *p;
int i;
for (i = *scan ; i > 0 ; i--) {
unsigned char const c = text [i-1];
if (!(c == ':' || c == '$' || isalnum ((unsigned char)*p)))
if (!(c == ':' || c == '$' || isalnum (c)))
break;
(*scan)--;
}
*scan = i;
}
static gboolean
......@@ -98,6 +97,10 @@ point_is_inside_range (ItemEdit *item_edit, const char *text, Range *range)
scan = cursor_pos;
scan_at (text, &scan);
/* If the range is on another sheet ignore it */
if (scan > 0 && text [scan-1] == '!')
return FALSE;
if ((v = range_parse (item_edit->scg->sheet, &text [scan], FALSE)) != NULL)
return setup_range_from_value (range, v);
......
......@@ -2856,18 +2856,17 @@ cb_notebook_switch_page (GtkNotebook *notebook, GtkNotebookPage *page,
if (wbcg->editing) {
/* If we are not at a subexpression boundary then finish editing */
accept = !workbook_editing_expr (wbcg);
if (accept)
workbook_finish_editing (wbcg, TRUE);
}
/* if we are not selecting a range for an expression update */
if (accept && wb_control_cur_sheet (WORKBOOK_CONTROL (wbcg)) != NULL) {
/* force an update of the status and edit regions */
sheet_flag_status_update_range (sheet, NULL);
sheet_update (sheet);
}
wb_view_sheet_focus (wb_control_view (WORKBOOK_CONTROL (wbcg)), sheet);
}
}
static GtkObjectClass *parent_class;
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment