jcs
/amend
/amendments
/47
browser+committer: Call TEDeactivate on read-only TextEdit boxes
This prevents drawing a cursor in them
jcs made amendment 47 over 2 years ago
--- browser.c Tue Jan 11 20:38:56 2022
+++ browser.c Tue Jan 18 17:33:57 2022
@@ -167,6 +167,8 @@ browser_init(struct repo *repo)
TETabWidth = settings.tabwidth;
TEAutoView(true, browser->diff_te);
TETabEnable(browser->diff_te);
+ /* don't ever give it a cursor */
+ TEDeactivate(browser->diff_te);
/* scrollbar for diff text */
bounds.right = browser->win->portRect.right - padding;
@@ -515,13 +517,6 @@ browser_update(struct browser *browser, EventRecord *e
browser_update_menu(browser);
UpdtControl(browser->win, browser->win->visRgn);
- break;
- case activateEvt:
- if (event->modifiers & activeFlag) {
- TEActivate(browser->diff_te);
- } else {
- TEDeactivate(browser->diff_te);
- }
break;
}
}
--- committer.c Tue Jan 11 20:30:41 2022
+++ committer.c Tue Jan 18 17:42:49 2022
@@ -118,6 +118,8 @@ committer_init(struct browser *browser)
committer->diff_te = TEStylNew(&te_bounds, &bounds);
TEAutoView(true, committer->diff_te);
TETabEnable(committer->diff_te);
+ /* don't ever give it a cursor */
+ TEDeactivate(committer->diff_te);
/* scrollbar for diff */
bounds.left = bounds.right;
@@ -219,10 +221,8 @@ committer_update(struct committer *committer, EventRec
case activateEvt:
if (event->modifiers & activeFlag) {
TEActivate(committer->log_te);
- TEActivate(committer->diff_te);
} else {
TEDeactivate(committer->log_te);
- TEDeactivate(committer->diff_te);
}
break;
}