home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.3 / 7.3.280 < prev    next >
Encoding:
Internet Message Format  |  2012-11-20  |  4.9 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.280
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.280
  11. Problem:    ":lmake" does not update the quickfix window title.
  12. Solution:   Update the title. (Lech Lorens)
  13. Files:        src/quickfix.c, src/testdir/test10.in, src/testdir/test10.ok
  14.  
  15.  
  16. *** ../vim-7.3.279/src/quickfix.c    2011-08-10 13:21:30.000000000 +0200
  17. --- src/quickfix.c    2011-08-10 18:09:19.000000000 +0200
  18. ***************
  19. *** 126,131 ****
  20. --- 126,132 ----
  21.   static win_T    *qf_find_win __ARGS((qf_info_T *qi));
  22.   static buf_T    *qf_find_buf __ARGS((qf_info_T *qi));
  23.   static void    qf_update_buffer __ARGS((qf_info_T *qi));
  24. + static void    qf_set_title __ARGS((qf_info_T *qi));
  25.   static void    qf_fill_buffer __ARGS((qf_info_T *qi));
  26.   #endif
  27.   static char_u    *get_mef_name __ARGS((void));
  28. ***************
  29. *** 2388,2395 ****
  30.       qf_fill_buffer(qi);
  31.   
  32.       if (qi->qf_lists[qi->qf_curlist].qf_title != NULL)
  33. !     set_internal_string_var((char_u *)"w:quickfix_title",
  34. !                        qi->qf_lists[qi->qf_curlist].qf_title);
  35.   
  36.       curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index;
  37.       curwin->w_cursor.col = 0;
  38. --- 2389,2395 ----
  39.       qf_fill_buffer(qi);
  40.   
  41.       if (qi->qf_lists[qi->qf_curlist].qf_title != NULL)
  42. !     qf_set_title(qi);
  43.   
  44.       curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index;
  45.       curwin->w_cursor.col = 0;
  46. ***************
  47. *** 2526,2531 ****
  48. --- 2526,2533 ----
  49.       qf_info_T    *qi;
  50.   {
  51.       buf_T    *buf;
  52. +     win_T    *win;
  53. +     win_T    *curwin_save;
  54.       aco_save_T    aco;
  55.   
  56.       /* Check if a buffer for the quickfix list exists.  Update it. */
  57. ***************
  58. *** 2537,2542 ****
  59. --- 2539,2554 ----
  60.   
  61.       qf_fill_buffer(qi);
  62.   
  63. +     if (qi->qf_lists[qi->qf_curlist].qf_title != NULL
  64. +         && (win = qf_find_win(qi)) != NULL)
  65. +     {
  66. +         curwin_save = curwin;
  67. +         curwin = win;
  68. +         qf_set_title(qi);
  69. +         curwin = curwin_save;
  70. +     }
  71.       /* restore curwin/curbuf and a few other things */
  72.       aucmd_restbuf(&aco);
  73.   
  74. ***************
  75. *** 2544,2549 ****
  76. --- 2556,2569 ----
  77.       }
  78.   }
  79.   
  80. +     static void
  81. + qf_set_title(qi)
  82. +     qf_info_T    *qi;
  83. + {
  84. +     set_internal_string_var((char_u *)"w:quickfix_title",
  85. +                     qi->qf_lists[qi->qf_curlist].qf_title);
  86. + }
  87.   /*
  88.    * Fill current buffer with quickfix errors, replacing any previous contents.
  89.    * curbuf must be the quickfix buffer!
  90. *** ../vim-7.3.279/src/testdir/test10.in    2011-08-10 13:21:30.000000000 +0200
  91. --- src/testdir/test10.in    2011-08-10 18:28:31.000000000 +0200
  92. ***************
  93. *** 5,13 ****
  94.   :" Also test a BOM is ignored.
  95.   :so mbyte.vim
  96.   :set encoding=utf-8
  97. ! :/start of errorfile/,/end of errorfile/w! Xerrorfile
  98.   :/start of testfile/,/end of testfile/w! Xtestfile
  99. ! :cf Xerrorfile
  100.   rA
  101.   :cn
  102.   rB
  103. --- 5,20 ----
  104.   :" Also test a BOM is ignored.
  105.   :so mbyte.vim
  106.   :set encoding=utf-8
  107. ! :7/start of errorfile/,/end of errorfile/w! Xerrorfile1
  108. ! :7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2
  109.   :/start of testfile/,/end of testfile/w! Xtestfile
  110. ! :cf Xerrorfile2
  111. ! :clast
  112. ! :copen
  113. ! :let a=w:quickfix_title
  114. ! :wincmd p
  115. ! gR=a
  116. ! :cf Xerrorfile1
  117.   rA
  118.   :cn
  119.   rB
  120. ***************
  121. *** 17,22 ****
  122. --- 24,34 ----
  123.   rD
  124.   :cn
  125.   rE
  126. + :cn
  127. + :wincmd w
  128. + :let a=w:quickfix_title
  129. + :wincmd p
  130. + gR=a
  131.   :w! test.out             " Write contents of this file
  132.   :qa!
  133.   ENDTEST
  134. ***************
  135. *** 33,38 ****
  136. --- 45,52 ----
  137.   "Xtestfile", linenr 19: yet another problem
  138.   
  139.   Does anyone know what is the problem and how to correction it?
  140. + "Xtestfile", line 21 col 9: What is the title of the quickfix window?
  141. + "Xtestfile", line 22 col 9: What is the title of the quickfix window?
  142.   end of errorfile
  143.   
  144.   start of testfile
  145. *** ../vim-7.3.279/src/testdir/test10.ok    2010-08-15 21:57:29.000000000 +0200
  146. --- src/testdir/test10.ok    2011-08-10 18:03:53.000000000 +0200
  147. ***************
  148. *** 18,23 ****
  149.   line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  150.   Eine 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  151.   line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  152. ! line 21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  153. ! line 22 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  154.   end of testfile
  155. --- 18,23 ----
  156.   line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  157.   Eine 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  158.   line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  159. ! line 21 :cf Xerrorfile1xxxxxxxxxxxxxxx
  160. ! line 22 :cf Xerrorfile2xxxxxxxxxxxxxxx
  161.   end of testfile
  162. *** ../vim-7.3.279/src/version.c    2011-08-10 17:44:41.000000000 +0200
  163. --- src/version.c    2011-08-10 18:35:52.000000000 +0200
  164. ***************
  165. *** 711,712 ****
  166. --- 711,714 ----
  167.   {   /* Add new patch number below this line */
  168. + /**/
  169. +     280,
  170.   /**/
  171.  
  172. -- 
  173. "When I die, I want a tombstone that says "GAME OVER" - Ton Richters
  174.  
  175.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  176. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  177. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  178.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  179.