To: vim_dev@googlegroups.com Subject: Patch 8.2.0622 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0622 Problem: Haiku: GUI does not compile. Solution: Various fixes. (Emir Sari, closes #5961) Files: Filelist, README.md, READMEdir/README_haiku.txt, runtime/doc/os_haiku.txt, src/Makefile, src/beval.h, src/gui_haiku.cc, src/proto/gui_haiku.pro *** ../vim-8.2.0621/Filelist 2020-04-05 20:20:40.100596581 +0200 --- Filelist 2020-04-23 15:30:38.312889184 +0200 *************** *** 607,612 **** --- 607,613 ---- # source files for Haiku (also in the extra archive) SRC_HAIKU = \ + README_haiku.txt \ src/os_haiku.h \ src/os_haiku.rdef \ src/gui_haiku.cc \ *** ../vim-8.2.0621/README.md 2020-01-26 15:52:33.007833314 +0100 --- README.md 2020-04-23 15:30:38.312889184 +0200 *************** *** 26,33 **** with ten fingers can work very fast. Additionally, function keys can be mapped to commands by the user, and the mouse can be used. ! Vim runs under MS-Windows (XP, Vista, 7, 8, 10), macOS, VMS and almost all ! flavours of UNIX. Porting to other systems should not be very difficult. Older versions of Vim run on MS-DOS, MS-Windows 95/98/Me/NT/2000, Amiga DOS, Atari MiNT, BeOS, RISC OS and OS/2. These are no longer maintained. --- 26,33 ---- with ten fingers can work very fast. Additionally, function keys can be mapped to commands by the user, and the mouse can be used. ! Vim runs under MS-Windows (XP, Vista, 7, 8, 10), macOS, Haiku, VMS and almost ! all flavours of UNIX. Porting to other systems should not be very difficult. Older versions of Vim run on MS-DOS, MS-Windows 95/98/Me/NT/2000, Amiga DOS, Atari MiNT, BeOS, RISC OS and OS/2. These are no longer maintained. *************** *** 72,77 **** --- 72,78 ---- README_unix.txt Unix README_dos.txt MS-DOS and MS-Windows README_mac.txt Macintosh + README_haiku.txt Haiku README_vms.txt VMS There are other `README_*.txt` files, depending on the distribution you used. *** ../vim-8.2.0621/READMEdir/README_haiku.txt 2020-04-23 15:40:27.415489349 +0200 --- READMEdir/README_haiku.txt 2020-04-23 15:30:38.312889184 +0200 *************** *** 0 **** --- 1,13 ---- + README_haiku.txt for version 8.2 of Vim: Vi IMproved. + + This file explains the installation of Vim on Haiku operating system. + See "README.txt" for general information about Vim. + + Preferred (and easy) way to get Vim on Haiku is to use default Haiku + software repository HaikuPorts. To get Vim: + + - Open HaikuDepot application and search for "vim" package, then install, + - Open a Terminal and type "pkgman install vim", then follow instructions. + + If you prefer to install Vim from source, follow the instructions on + "runtime/doc/os_haiku.txt", "Compiling Haiku" section. *** ../vim-8.2.0621/runtime/doc/os_haiku.txt 2020-02-26 16:15:31.064386980 +0100 --- runtime/doc/os_haiku.txt 2020-04-23 15:30:38.312889184 +0200 *************** *** 1,4 **** ! *os_haiku.txt* For Vim version 8.2. Last change: 2020 Feb 26 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *os_haiku.txt* For Vim version 8.2. Last change: 2020 Mar 19 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 16,22 **** 2. Compiling Vim |haiku-compiling| 3. The Haiku GUI |haiku-gui| 4. The $VIM directory |haiku-vimdir| ! 5. The $BE_USER_SETTINGS directory |haiku-user-settings-dir| 6. Drag & Drop |haiku-dragndrop| 7. Single Launch vs. Multiple --- 16,22 ---- 2. Compiling Vim |haiku-compiling| 3. The Haiku GUI |haiku-gui| 4. The $VIM directory |haiku-vimdir| ! 5. The $USER_SETTINGS_DIR directory |haiku-user-settings-dir| 6. Drag & Drop |haiku-dragndrop| 7. Single Launch vs. Multiple *************** *** 26,32 **** 10. Mouse key mappings |haiku-mouse| 11. Color names |haiku-colors| 12. Credits |haiku-support-credits| ! 13. Bugs & things To Do |haiku-bugs| 1. General *haiku-general* --- 26,32 ---- 10. Mouse key mappings |haiku-mouse| 11. Color names |haiku-colors| 12. Credits |haiku-support-credits| ! 13. Bugs & to-do |haiku-bugs| 1. General *haiku-general* *************** *** 44,51 **** vim with the Haiku GUI support. Run ./configure --help , to find out other features you can enable/disable. Now you should use "make" to compile Vim, then "make install" to install it. ! For seamless integration into the Haiku the GUI-less vim binary should be additionally installed over the GUI version. Typical build commands are: > ./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \ --- 44,55 ---- vim with the Haiku GUI support. Run ./configure --help , to find out other features you can enable/disable. + Haiku uses "ncurses6" as its terminal library, therefore you need to have + "ncurses6_devel" package installed from HaikuDepot in order to configure + the Haiku build. + Now you should use "make" to compile Vim, then "make install" to install it. ! For seamless integration into Haiku, the GUI-less vim binary should be additionally installed over the GUI version. Typical build commands are: > ./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \ *************** *** 78,97 **** still playing with the scrollbar it won't change it itself. I provided a workaround which kicks in when the window is activated or deactivated (so it works best with focus- follows-mouse turned on). ! - The cursor does not flash (very low priority; I'm not sure I even like it ! when it flashes) 4. The $VIM directory *haiku-vimdir* ! $VIM is the symbolic name for the place where Vims support files are stored. The default value for $VIM is set at compile time and can be determined with > :version ! The normal value is /boot/common/data/vim. If you don't like it you can ! set the VIM environment variable to override this, or set 'helpfile' in your ! .vimrc: > :if version >= 500 : set helpfile=~/vim/runtime/doc/help.txt --- 82,101 ---- still playing with the scrollbar it won't change it itself. I provided a workaround which kicks in when the window is activated or deactivated (so it works best with focus- follows-mouse turned on). ! - The cursor does not flash. 4. The $VIM directory *haiku-vimdir* ! $VIM is the symbolic name for the place where Vim's support files are stored. The default value for $VIM is set at compile time and can be determined with > :version ! The normal value is /boot/system/data/vim for Haikuports version, ! /boot/system/non-packaged/data/vim for manual builds. If you don't like it ! you can set the VIM environment variable to override this, or set 'helpfile' ! in your .vimrc: > :if version >= 500 : set helpfile=~/vim/runtime/doc/help.txt *************** *** 216,228 **** Thank you, all! ! 13. Bugs & things To Do *haiku-bugs* ! ! The port is under development now and far away from the perfect state. Bug ! reports, patches and wishes are welcome. ! ! ! -Siarzhuk Zharski vim:tw=78:ts=8:ft=help:norl: --- 220,233 ---- Thank you, all! ! 13. Bugs & to-do *haiku-bugs* ! ! The port is under development now and far away from the perfect state. For bug ! reports, patches and wishes, please use the Vim mailing list or Vim Github ! repository. ! ! Mailing list: https://www.vim.org/maillist.php ! Vim Github repository: https://github.com/vim/vim vim:tw=78:ts=8:ft=help:norl: *** ../vim-8.2.0621/src/Makefile 2020-04-23 14:41:42.843059324 +0200 --- src/Makefile 2020-04-23 15:30:38.312889184 +0200 *************** *** 1404,1411 **** HAIKUGUI_BUNDLE = # All GUI files ! ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c ! ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w32.pro gui_photon.pro # }}} --- 1404,1411 ---- HAIKUGUI_BUNDLE = # All GUI files ! ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c gui_haiku.cc ! ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w32.pro gui_photon.pro gui_haiku.pro # }}} *** ../vim-8.2.0621/src/beval.h 2020-01-26 21:59:25.620718163 +0100 --- src/beval.h 2020-04-23 15:30:38.312889184 +0200 *************** *** 79,84 **** --- 79,88 ---- #ifdef FEAT_GUI_MSWIN void *tofree; #endif + #ifdef FEAT_GUI_HAIKU + int x; + int y; + #endif } BalloonEval; #define EVAL_OFFSET_X 15 // displacement of beval topleft corner from pointer *** ../vim-8.2.0621/src/gui_haiku.cc 2020-02-26 16:15:31.072386953 +0100 --- src/gui_haiku.cc 2020-04-23 15:38:39.399738387 +0200 *************** *** 2916,2921 **** --- 2916,2922 ---- menu->button = NULL; } } + return true; } bool *************** *** 2926,2931 **** --- 2927,2933 ---- if(index >= 0) menu->button->SetEnabled(grey ? false : true); } + return true; } void *************** *** 3563,3569 **** gui.vimTextArea->MoveTo(x, y); gui.vimTextArea->ResizeTo(w - PEN_WIDTH, h - PEN_WIDTH); ! /*#ifdef FEAT_GUI_TABLINE if(gui.vimForm->TabLine() != NULL) { gui.vimForm->TabLine()->ResizeTo(w, gui.vimForm->TablineHeight()); } --- 3565,3571 ---- gui.vimTextArea->MoveTo(x, y); gui.vimTextArea->ResizeTo(w - PEN_WIDTH, h - PEN_WIDTH); ! #ifdef FEAT_GUI_TABLINE if(gui.vimForm->TabLine() != NULL) { gui.vimForm->TabLine()->ResizeTo(w, gui.vimForm->TablineHeight()); } *************** *** 3679,3685 **** } } ! #if defined(FEAT_WINDOWS) || defined(PROTO) void gui_mch_destroy_scrollbar( scrollbar_T *sb) --- 3681,3687 ---- } } ! #if defined(FEAT_WINDOWS) || defined(FEAT_GUI_HAIKU) || defined(PROTO) void gui_mch_destroy_scrollbar( scrollbar_T *sb) *************** *** 3736,3742 **** * Stop the cursor blinking. Show the cursor if it wasn't shown. */ void ! gui_mch_stop_blink() { // TODO if (blink_timer != 0) --- 3738,3744 ---- * Stop the cursor blinking. Show the cursor if it wasn't shown. */ void ! gui_mch_stop_blink(int may_call_gui_update_cursor) { // TODO if (blink_timer != 0) *************** *** 3870,3876 **** hl_set_font_name((char_u*)font_name); // Set guifont to the name of the selected font. ! char_u* new_p_guifont = alloc(STRLEN(font_name) + 1); if (new_p_guifont != NULL) { STRCPY(new_p_guifont, font_name); vim_free(p_guifont); --- 3872,3878 ---- hl_set_font_name((char_u*)font_name); // Set guifont to the name of the selected font. ! char_u* new_p_guifont = (char_u*)alloc(STRLEN(font_name) + 1); if (new_p_guifont != NULL) { STRCPY(new_p_guifont, font_name); vim_free(p_guifont); *************** *** 4488,4494 **** if (gui.in_focus) gui_mch_start_blink(); else ! gui_mch_stop_blink(); focus = gui.in_focus; } --- 4490,4496 ---- if (gui.in_focus) gui_mch_start_blink(); else ! gui_mch_stop_blink(TRUE); focus = gui.in_focus; } *** ../vim-8.2.0621/src/proto/gui_haiku.pro 2020-02-26 16:15:31.072386953 +0100 --- src/proto/gui_haiku.pro 2020-04-23 15:30:38.312889184 +0200 *************** *** 6,12 **** void gui_mch_exit(int vim_exitcode); int gui_mch_init_check(void); void gui_mch_flush(void); ! void gui_mch_new_colors(void); void gui_mch_set_bg_color(guicolor_T color); void gui_mch_set_fg_color(guicolor_T color); --- 6,12 ---- void gui_mch_exit(int vim_exitcode); int gui_mch_init_check(void); void gui_mch_flush(void); ! int gui_mch_is_blink_off(void); void gui_mch_new_colors(void); void gui_mch_set_bg_color(guicolor_T color); void gui_mch_set_fg_color(guicolor_T color); *** ../vim-8.2.0621/src/version.c 2020-04-23 14:41:42.847059320 +0200 --- src/version.c 2020-04-23 15:40:14.279519521 +0200 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 622, /**/ -- A)bort, R)etry, D)o it right this time /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///