Loading ...
Sorry, an error occurred while loading the content.
 

[BUG:Matchit] Erratic matchit jumping

Expand Messages
  • Tony Mechelynck
    Trying again, apparently my attachment got rejected somewhere along the way. In the HTML file http://users.skynet.be/antoine.mechelynck/vim/prenoms.htm (in
    Message 1 of 1 , Sep 25, 2005
      Trying again, apparently my attachment got rejected somewhere along the way.

      In the HTML file http://users.skynet.be/antoine.mechelynck/vim/prenoms.htm
      (in UTF-8 with BOM), % on an opening tag usually (but not always) finds the
      match forward; % on a closing tag or on < or > finds the match only part the
      time. The rest of the time % just does nothing. What went wrong? I suspect
      it has something to do with multibyte characters (UTF-8 codepoints above
      U+007F). (The French text sometimes includes accented letters; the Arabic
      text includes not only Arabic letters but also composing characters.) (Use
      Vim with netrw and with 'enc' = utf-8 to see the file code. Clicking on the
      link above shows it as rendered by your browser.)

      Sometimes % jumps to the wrong place, as in the <td class="latin"> line for
      Abdelaziz (where % on <I> </I> <b> or </b> jumps not to the corresponding
      paired tag but to a round bracket).

      Using gvim.exe (":version" listing is at
      http://users.skynet.be/antoine.mechelynck/vim/v7gvim.txt at the moment) and
      $VIM/vim70aa/macros/matchit.vim, both as per snapshot 149. "Standard"
      b:match_words for HTML.

      Best regards,
      Tony.

      Analysis (until the 3rd line of the table):

      <html> < OK > OK Tag: FW: OK BW: OK </ OK > OK
      <head> < OK > OK Tag: FW: OK BW: OK </ OK > OK
      <meta> < OK > OK
      <title> < Err > Err Tag: FW: Err BW: Err </ Err > Err
      <style> < OK > OK Tag: FW: OK BW: OK </ OK > OK
      <body> < OK > OK Tag: FW: OK BW: OK </ OK > OK
      <h1> < Err > Err Tag: FW: Err BW:Err </ Err > Err
      <table> < OK > OK Tag: FW: OK BW: OK </ OK > OK
      <tr> (Abdulakhir) < OK > OK Tag: FW: OK BW: Err </
      Err > Err
      <td> < OK > OK Tag: FW: OK BW: Err </ Err >
      Err
      <td> < OK > OK Tag: FW: OK BW: Err </ Err >
      Err
      <I> < Err > Err Tag: FW: Err BW: Err </ Err
      > Err
      <tr> (Abdulawwal) < OK > OK Tag: FW: OK BW: Err </
      Err > Err
      <td> < OK > OK Tag: FW: OK BW: Err </ Err >
      Err
      <td> < OK > OK Tag: FW: OK BW: Err </ Err >
      Err
      <I> < Err > Err Tag: FW: Err BW: Err </ Err
      > Err
      <tr> (Abdulbadi) < OK > OK Tag: FW: OK BW: OK </ OK
      > OK
      <td> < OK > OK Tag: FW: OK BW: Err </ Err >
      Err
      <td> < OK > OK Tag: FW: OK BW: OK </ OK > OK
      <I> < OK > OK Tag: FW: OK BW: OK </ OK >
      OK
      etc.
    Your message has been successfully submitted and would be delivered to recipients shortly.