diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/editfns.c | 9 | ||||
| -rw-r--r-- | src/w32fns.c | 14 |
2 files changed, 14 insertions, 9 deletions
diff --git a/src/editfns.c b/src/editfns.c index e16a554de20..4dbf4805721 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3139,6 +3139,9 @@ static unsigned short rbc_quitcounter; /* Buffers to compare. */ \ struct buffer *buffer_a; \ struct buffer *buffer_b; \ + /* BEGV of each buffer */ \ + ptrdiff_t beg_a; \ + ptrdiff_t beg_b; \ /* Whether each buffer is unibyte/plain-ASCII or not. */ \ bool a_unibyte; \ bool b_unibyte; \ @@ -3222,6 +3225,8 @@ differences between the two buffers. */) struct context ctx = { .buffer_a = a, .buffer_b = b, + .beg_a = min_a, + .beg_b = min_b, .a_unibyte = BUF_ZV (a) == BUF_ZV_BYTE (a), .b_unibyte = BUF_ZV (b) == BUF_ZV_BYTE (b), .deletions = SAFE_ALLOCA (del_bytes), @@ -3361,8 +3366,8 @@ static bool buffer_chars_equal (struct context *ctx, ptrdiff_t pos_a, ptrdiff_t pos_b) { - pos_a += BUF_BEGV (ctx->buffer_a); - pos_b += BUF_BEGV (ctx->buffer_b); + pos_a += ctx->beg_a; + pos_b += ctx->beg_b; /* Allow the user to escape out of a slow compareseq call. */ rarely_quit (++rbc_quitcounter); diff --git a/src/w32fns.c b/src/w32fns.c index 7f7e1a404ce..760801cd1db 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -4550,13 +4550,13 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) set_ime_composition_window_fn (context, &form); release_ime_context_fn (hwnd, context); } - /* We should "goto dflt" here to pass WM_IME_STARTCOMPOSITION to - DefWindowProc, so that the composition window will actually - be displayed. But doing so causes trouble with displaying - dialog boxes, such as the file selection dialog or font - selection dialog. So something else is needed to fix the - former without breaking the latter. See bug#11732. */ - break; + /* FIXME: somehow "goto dflt" here instead of "break" causes + popup dialogs, such as the ones shown by File->Open File and + w32-select-font, to become hidden behind their parent frame, + when focus-follows-mouse is in effect. See bug#11732. But + if we don't "goto dflt", users of IME cannot type text + supported by the input method... */ + goto dflt; case WM_IME_ENDCOMPOSITION: ignore_ime_char = 0; |
