@@ -340,6 +340,7 @@ absval (SI x) {
340340
341341void
342342edit_interface_rep::make_cursor_visible () {
343+ if (!is_nil (buf) && buf->message_widget ) return ;
343344 cursor cu = get_cursor ();
344345 cursor_blink_visible= true ;
345346 if (cursor_blink_active && cursor_blink_period > 0 )
@@ -355,6 +356,7 @@ edit_interface_rep::make_cursor_visible () {
355356
356357void
357358edit_interface_rep::cursor_visible () {
359+ if (!is_nil (buf) && buf->message_widget ) return ;
358360 path sp = find_innermost_scroll (eb, tp);
359361 cursor cu = get_cursor ();
360362 cursor_blink_visible= true ;
@@ -967,30 +969,33 @@ edit_interface_rep::apply_changes () {
967969 set_user_active (false );
968970 }
969971
970- SI dw= 0 ;
971- if (tremble_count > 3 ) dw= (1 + min (tremble_count - 3 , 25 )) * 2 * pixel;
972- SI /* P1= zpixel,*/ P2 = 2 * zpixel, P3 = 3 * zpixel;
973- cursor cu= get_cursor ();
974- rectangle ocr (oc->ox + ((SI ) ((oc->y1 - dw) * oc->slope )) - P3 - dw,
975- oc->oy + (oc->y1 - dw) - P3 ,
976- oc->ox + ((SI ) ((oc->y2 + dw) * oc->slope )) + P2 + dw,
977- oc->oy + (oc->y2 + dw) + P3 );
978- if (is_nil (copy_always) || copy_always->item != ocr) {
979- copy_always= rectangles (ocr, copy_always);
980- }
981- invalidate (ocr->x1 , ocr->y1 , ocr->x2 , ocr->y2 );
982- rectangle ncr (cu->ox + ((SI ) ((cu->y1 - dw) * cu->slope )) - P3 - dw,
983- cu->oy + (cu->y1 - dw) - P3 ,
984- cu->ox + ((SI ) ((cu->y2 + dw) * cu->slope )) + P2 + dw,
985- cu->oy + (cu->y2 + dw) + P3 );
986- invalidate (ncr->x1 , ncr->y1 , ncr->x2 , ncr->y2 );
987- if (is_nil (copy_always) || copy_always->item != ncr) {
988- copy_always= rectangles (ncr, copy_always);
989- }
990- oc= copy (cu);
972+ if (is_nil (buf) || !buf->message_widget ) {
973+ SI dw= 0 ;
974+ if (tremble_count > 3 ) dw= (1 + min (tremble_count - 3 , 25 )) * 2 * pixel;
975+ SI /* P1= zpixel,*/ P2 = 2 * zpixel, P3 = 3 * zpixel;
976+ cursor cu= get_cursor ();
977+ rectangle ocr (oc->ox + ((SI ) ((oc->y1 - dw) * oc->slope )) - P3 - dw,
978+ oc->oy + (oc->y1 - dw) - P3 ,
979+ oc->ox + ((SI ) ((oc->y2 + dw) * oc->slope )) + P2 + dw,
980+ oc->oy + (oc->y2 + dw) + P3 );
981+ if (is_nil (copy_always) || copy_always->item != ocr) {
982+ copy_always= rectangles (ocr, copy_always);
983+ }
984+ invalidate (ocr->x1 , ocr->y1 , ocr->x2 , ocr->y2 );
985+ rectangle ncr (cu->ox + ((SI ) ((cu->y1 - dw) * cu->slope )) - P3 - dw,
986+ cu->oy + (cu->y1 - dw) - P3 ,
987+ cu->ox + ((SI ) ((cu->y2 + dw) * cu->slope )) + P2 + dw,
988+ cu->oy + (cu->y2 + dw) + P3 );
989+ invalidate (ncr->x1 , ncr->y1 , ncr->x2 , ncr->y2 );
990+ if (is_nil (copy_always) || copy_always->item != ncr) {
991+ copy_always= rectangles (ncr, copy_always);
992+ }
993+ oc= copy (cu);
991994
992- // set hot spot in the gui
993- send_cursor (this , (SI ) floor (cu->ox * magf), (SI ) floor (cu->oy * magf));
995+ // set hot spot in the gui
996+ send_cursor (this , (SI ) floor (cu->ox * magf),
997+ (SI ) floor (cu->oy * magf));
998+ }
994999
9951000 path sp = selection_get_cursor_path ();
9961001 bool semantic_flag= semantic_active (path_up (sp));
@@ -1062,6 +1067,7 @@ edit_interface_rep::apply_changes () {
10621067 selection_rects= rs;
10631068 invalidate (selection_rects);
10641069 }
1070+ if (!is_nil (buf) && buf->message_widget ) invalidate (vx1, vy1, vx2, vy2);
10651071 // 选区改变后更新文本工具栏
10661072 update_text_popup ();
10671073 }
@@ -1169,6 +1175,7 @@ edit_interface_rep::animate () {
11691175 invalidate (rs);
11701176 stored_rects= rectangles ();
11711177 }
1178+ if (!is_nil (buf) && buf->message_widget ) return ;
11721179 if (cursor_blink_active && cursor_blink_period > 0 &&
11731180 get_preference (" draw cursor" ) == " on" && now_ms >= cursor_blink_next) {
11741181 cursor_blink_visible= !cursor_blink_visible;
0 commit comments