To: vim-dev@vim.org Subject: Patch 6.2.477 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.477 Problem: Using remote_send(v:servername, "\") causes Vim to hang. (Yakov Lerner) Solution: When the resulting string is empty don't set received_from_client. Files: src/main.c *** ../vim-6.2.476/src/main.c Tue Mar 30 22:11:17 2004 --- src/main.c Fri Apr 16 20:17:21 2004 *************** *** 3105,3125 **** str = replace_termcodes((char_u *)str, &ptr, FALSE, TRUE); p_cpo = cpo_save; ! /* ! * Add the string to the input stream. ! * Can't use add_to_input_buf() here, we now have K_SPECIAL bytes. ! * ! * First clear typed characters from the typeahead buffer, there could be ! * half a mapping there. Then append to the existing string, so that ! * multiple commands from a client are concatenated. ! */ ! if (typebuf.tb_maplen < typebuf.tb_len) ! del_typebuf(typebuf.tb_len - typebuf.tb_maplen, typebuf.tb_maplen); ! (void)ins_typebuf(str, REMAP_NONE, typebuf.tb_len, TRUE, FALSE); ! vim_free((char_u *)ptr); ! /* Let input_available() know we inserted text in the typeahead buffer. */ ! received_from_client = TRUE; } /* --- 3105,3129 ---- str = replace_termcodes((char_u *)str, &ptr, FALSE, TRUE); p_cpo = cpo_save; ! if (*ptr != NUL) /* trailing CTRL-V results in nothing */ ! { ! /* ! * Add the string to the input stream. ! * Can't use add_to_input_buf() here, we now have K_SPECIAL bytes. ! * ! * First clear typed characters from the typeahead buffer, there could ! * be half a mapping there. Then append to the existing string, so ! * that multiple commands from a client are concatenated. ! */ ! if (typebuf.tb_maplen < typebuf.tb_len) ! del_typebuf(typebuf.tb_len - typebuf.tb_maplen, typebuf.tb_maplen); ! (void)ins_typebuf(str, REMAP_NONE, typebuf.tb_len, TRUE, FALSE); ! /* Let input_available() know we inserted text in the typeahead ! * buffer. */ ! received_from_client = TRUE; ! } ! vim_free((char_u *)ptr); } /* *** ../vim-6.2.476/src/version.c Fri Apr 16 19:59:33 2004 --- src/version.c Fri Apr 16 20:15:49 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 477, /**/ -- Close your shells, or I'll kill -9 you Tomorrow I'll quota you Remember the disks'll always be full And then while I'm away I'll write ~ everyday And I'll send-pr all my buggings to you. [ CVS log "Beatles style" for FreeBSD ports/INDEX, Satoshi Asami ] /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///