comparison src/gui_w32.c @ 26771:fc859aea8cec v8.2.3914

patch 8.2.3914: various spelling mistakes in comments Commit: https://github.com/vim/vim/commit/af4a61a85d6e8cacc35324f266934bc463a21673 Author: Dominique Pelle <dominique.pelle@gmail.com> Date: Mon Dec 27 17:21:41 2021 +0000 patch 8.2.3914: various spelling mistakes in comments Problem: Various spelling mistakes in comments. Solution: Fix the mistakes. (Dominique Pell?, closes https://github.com/vim/vim/issues/9416)
author Bram Moolenaar <Bram@vim.org>
date Mon, 27 Dec 2021 18:30:05 +0100
parents 324086c6f757
children bce848ec8b1b
comparison
equal deleted inserted replaced
26770:15ff3f2e0d58 26771:fc859aea8cec
3039 3039
3040 // Check if the window is (partly) off-screen. 3040 // Check if the window is (partly) off-screen.
3041 if (!is_window_onscreen(s_hwnd)) 3041 if (!is_window_onscreen(s_hwnd))
3042 return SW_INVALIDATE; 3042 return SW_INVALIDATE;
3043 3043
3044 // Check if there is an window (partly) on top of us. 3044 // Check if there is a window (partly) on top of us.
3045 GetWindowRect(s_hwnd, &rcVim); 3045 GetWindowRect(s_hwnd, &rcVim);
3046 for (hwnd = s_hwnd; (hwnd = GetWindow(hwnd, GW_HWNDPREV)) != (HWND)0; ) 3046 for (hwnd = s_hwnd; (hwnd = GetWindow(hwnd, GW_HWNDPREV)) != (HWND)0; )
3047 if (IsWindowVisible(hwnd)) 3047 if (IsWindowVisible(hwnd))
3048 { 3048 {
3049 GetWindowRect(hwnd, &rcOther); 3049 GetWindowRect(hwnd, &rcOther);
5738 char_u *buf; 5738 char_u *buf;
5739 5739
5740 if (!pImmGetContext) 5740 if (!pImmGetContext)
5741 return NULL; // no imm32.dll 5741 return NULL; // no imm32.dll
5742 5742
5743 // Try Unicode; this'll always work on NT regardless of codepage. 5743 // Try Unicode; this will always work on NT regardless of codepage.
5744 ret = pImmGetCompositionStringW(hIMC, GCS, NULL, 0); 5744 ret = pImmGetCompositionStringW(hIMC, GCS, NULL, 0);
5745 if (ret == 0) 5745 if (ret == 0)
5746 return NULL; // empty 5746 return NULL; // empty
5747 5747
5748 if (ret > 0) 5748 if (ret > 0)
5755 *lenp = ret / sizeof(WCHAR); 5755 *lenp = ret / sizeof(WCHAR);
5756 } 5756 }
5757 return (short_u *)wbuf; 5757 return (short_u *)wbuf;
5758 } 5758 }
5759 5759
5760 // ret < 0; we got an error, so try the ANSI version. This'll work 5760 // ret < 0; we got an error, so try the ANSI version. This will work
5761 // on 9x/ME, but only if the codepage happens to be set to whatever 5761 // on 9x/ME, but only if the codepage happens to be set to whatever
5762 // we're inputting. 5762 // we're inputting.
5763 ret = pImmGetCompositionStringA(hIMC, GCS, NULL, 0); 5763 ret = pImmGetCompositionStringA(hIMC, GCS, NULL, 0);
5764 if (ret <= 0) 5764 if (ret <= 0)
5765 return NULL; // empty or error 5765 return NULL; // empty or error
7388 nchar = nCopyAnsiToWideChar(p, (LPSTR)caption, TRUE); //strlen(caption)+1 7388 nchar = nCopyAnsiToWideChar(p, (LPSTR)caption, TRUE); //strlen(caption)+1
7389 p += nchar; 7389 p += nchar;
7390 7390
7391 *p++ = 0; // advance pointer over nExtraStuff WORD - 2 more 7391 *p++ = 0; // advance pointer over nExtraStuff WORD - 2 more
7392 7392
7393 return p; //total = 15+ (strlen(caption)) words 7393 return p; // total = 15 + strlen(caption) words
7394 // = 30 + 2(strlen(caption) bytes reqd 7394 // bytes read = 2 * total
7395 } 7395 }
7396 7396
7397 7397
7398 /* 7398 /*
7399 * Helper routine. Take an input pointer, return closest pointer that is 7399 * Helper routine. Take an input pointer, return closest pointer that is