]>
Commit | Line | Data |
---|---|---|
d2415672 AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.1.196 (extra) | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.1.196 (extra) | |
11 | Problem: Win32 GUI: "\n" in a tooltip doesn't cause a line break. (Erik | |
12 | Falor) | |
13 | Solution: Use the TTM_SETMAXTIPWIDTH message. | |
14 | Files: src/gui_w32.c | |
15 | ||
16 | ||
17 | *** ../vim-7.1.195/src/gui_w32.c Thu Aug 30 12:24:21 2007 | |
18 | --- src/gui_w32.c Thu Jan 3 13:56:26 2008 | |
19 | *************** | |
20 | *** 987,992 **** | |
21 | --- 987,997 ---- | |
22 | { | |
23 | LPNMTTDISPINFOW lpdi = (LPNMTTDISPINFOW)lParam; | |
24 | ||
25 | + /* Set the maximum width, this also enables using | |
26 | + * \n for line break. */ | |
27 | + SendMessage(lpdi->hdr.hwndFrom, TTM_SETMAXTIPWIDTH, | |
28 | + 0, 500); | |
29 | + | |
30 | tt_text = enc_to_ucs2(str, NULL); | |
31 | lpdi->lpszText = tt_text; | |
32 | /* can't show tooltip if failed */ | |
33 | *************** | |
34 | *** 996,1001 **** | |
35 | --- 1001,1011 ---- | |
36 | { | |
37 | LPNMTTDISPINFO lpdi = (LPNMTTDISPINFO)lParam; | |
38 | ||
39 | + /* Set the maximum width, this also enables using | |
40 | + * \n for line break. */ | |
41 | + SendMessage(lpdi->hdr.hwndFrom, TTM_SETMAXTIPWIDTH, | |
42 | + 0, 500); | |
43 | + | |
44 | if (STRLEN(str) < sizeof(lpdi->szText) | |
45 | || ((tt_text = vim_strsave(str)) == NULL)) | |
46 | vim_strncpy(lpdi->szText, str, | |
47 | *************** | |
48 | *** 4734,4745 **** | |
49 | cur_beval->showState = ShS_NEUTRAL; | |
50 | break; | |
51 | case TTN_GETDISPINFO: | |
52 | ! { | |
53 | ! /* if you get there then we have new common controls */ | |
54 | ! NMTTDISPINFO_NEW *info = (NMTTDISPINFO_NEW *)pnmh; | |
55 | ! info->lpszText = (LPSTR)info->lParam; | |
56 | ! info->uFlags |= TTF_DI_SETITEM; | |
57 | ! } | |
58 | break; | |
59 | } | |
60 | } | |
61 | --- 4744,4755 ---- | |
62 | cur_beval->showState = ShS_NEUTRAL; | |
63 | break; | |
64 | case TTN_GETDISPINFO: | |
65 | ! { | |
66 | ! /* if you get there then we have new common controls */ | |
67 | ! NMTTDISPINFO_NEW *info = (NMTTDISPINFO_NEW *)pnmh; | |
68 | ! info->lpszText = (LPSTR)info->lParam; | |
69 | ! info->uFlags |= TTF_DI_SETITEM; | |
70 | ! } | |
71 | break; | |
72 | } | |
73 | } | |
74 | *** ../vim-7.1.195/src/version.c Thu Jan 3 20:21:34 2008 | |
75 | --- src/version.c Thu Jan 3 20:43:22 2008 | |
76 | *************** | |
77 | *** 668,669 **** | |
78 | --- 668,671 ---- | |
79 | { /* Add new patch number below this line */ | |
80 | + /**/ | |
81 | + 196, | |
82 | /**/ | |
83 | ||
84 | -- | |
85 | Shit makes the flowers grow and that's beautiful | |
86 | ||
87 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
88 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
89 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
90 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |