summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xamiga/gui.c15
-rwxr-xr-xamiga/gui.h7
2 files changed, 9 insertions, 13 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 9680b671f..5abf40472 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3755,14 +3755,12 @@ void gui_window_place_caret(struct gui_window *g, int x, int y, int height)
if(((x-xs) <= 0) || ((x-xs+2) >= (bbox->Width)) || ((y-ys) <= 0) || ((y-ys) >= (bbox->Height))) return;
-/* Backup the area under the cursor - args need checking
- BltBitMap(g->shared->win->RPort->BitMap, bbox->Left+x-xs, bbox->Top+y-ys,
- browserglob.bm, x-xs, y-ys,2+1, height+1, 0x0C0, 0xff, NULL);
-*/
+ g->c_w = 2;
SetDrMd(g->shared->win->RPort,COMPLEMENT);
- RectFill(g->shared->win->RPort,x+bbox->Left-xs,y+bbox->Top-ys,x+bbox->Left+2-xs,y+bbox->Top+height-ys);
+ RectFill(g->shared->win->RPort, x + bbox->Left - xs, y + bbox->Top - ys,
+ x + bbox->Left + g->c_w - xs, y+bbox->Top + height - ys);
SetDrMd(g->shared->win->RPort,JAM1);
@@ -3787,11 +3785,8 @@ void gui_window_remove_caret(struct gui_window *g)
(g->shared->bw->browser_window_type == BROWSER_WINDOW_NORMAL))
OffMenu(g->shared->win, AMI_MENU_PASTE);
- GetAttr(SPACE_AreaBox, g->shared->objects[GID_BROWSER], (ULONG *)&bbox);
- ami_get_hscroll_pos(g->shared, (ULONG *)&xs);
- ami_get_vscroll_pos(g->shared, (ULONG *)&ys);
-
- BltBitMapRastPort(browserglob.bm,g->c_x-xs,g->c_y-ys,g->shared->win->RPort,bbox->Left+g->c_x-xs,bbox->Top+g->c_y-ys,2+1,g->c_h+1,0x0C0);
+ ami_do_redraw_limits(g, g->shared->bw, g->c_x, g->c_y,
+ g->c_x + g->c_w + 1, g->c_y + g->c_h + 1);
g->c_h = 0;
}
diff --git a/amiga/gui.h b/amiga/gui.h
index 9f90112e8..c31d2cc1a 100755
--- a/amiga/gui.h
+++ b/amiga/gui.h
@@ -116,9 +116,10 @@ struct gui_window
struct gui_window_2 *shared;
int tab;
struct Node *tab_node;
- int c_x;
- int c_y;
- int c_h;
+ int c_x; /* Caret X posn */
+ int c_y; /* Caret Y posn */
+ int c_w; /* Caret width */
+ int c_h; /* Caret height */
int c_h_temp;
int scrollx;
int scrolly;