Patch 8.2.4439
Problem:    Accepting "iso8859" 'encoding' as "iso-8859-".
Solution:   use "iso8859" as "iso-8859-1".
Files:      src/mbyte.c, src/testdir/test_options.vim


*** ../vim-8.2.4438/src/mbyte.c 2022-01-02 21:26:12.315264334 +0000
--- src/mbyte.c 2022-02-22 12:24:46.155585099 +0000
***************
*** 318,323 ****
--- 318,324 ----
  {
      {"ansi",          IDX_LATIN_1},
      {"iso-8859-1",    IDX_LATIN_1},
+     {"iso-8859",      IDX_LATIN_1},
      {"latin2",                IDX_ISO_2},
      {"latin3",                IDX_ISO_3},
      {"latin4",                IDX_ISO_4},
***************
*** 4523,4529 ****
        }
  
        // "iso-8859n" -> "iso-8859-n"
!       if (STRNCMP(p, "iso-8859", 8) == 0 && p[8] != '-')
        {
            STRMOVE(p + 9, p + 8);
            p[8] = '-';
--- 4524,4530 ----
        }
  
        // "iso-8859n" -> "iso-8859-n"
!       if (STRNCMP(p, "iso-8859", 8) == 0 && isdigit(p[8]))
        {
            STRMOVE(p + 9, p + 8);
            p[8] = '-';
*** ../vim-8.2.4438/src/testdir/test_options.vim        2022-01-28 
20:47:44.103611022 +0000
--- src/testdir/test_options.vim        2022-02-22 12:33:29.947412346 +0000
***************
*** 445,450 ****
--- 445,475 ----
    call assert_fails('set t_#-&', 'E522:')
  endfunc
  
+ func Test_set_encoding()
+   let save_encoding = &encoding
+ 
+   set enc=iso8859-1
+   call assert_equal('latin1', &enc)
+   set enc=iso8859_1
+   call assert_equal('latin1', &enc)
+   set enc=iso-8859-1
+   call assert_equal('latin1', &enc)
+   set enc=iso_8859_1
+   call assert_equal('latin1', &enc)
+   set enc=iso88591
+   call assert_equal('latin1', &enc)
+   set enc=iso8859
+   call assert_equal('latin1', &enc)
+   set enc=iso-8859
+   call assert_equal('latin1', &enc)
+   set enc=iso_8859
+   call assert_equal('latin1', &enc)
+   call assert_fails('set enc=iso8858', 'E474:')
+   call assert_equal('latin1', &enc)
+ 
+   let &encoding = save_encoding
+ endfunc
+ 
  func CheckWasSet(name)
    let verb_cm = execute('verbose set ' .. a:name .. '?')
    call assert_match('Last set from.*test_options.vim', verb_cm)
*** ../vim-8.2.4438/src/version.c       2022-02-22 12:08:03.985154998 +0000
--- src/version.c       2022-02-22 12:33:56.359384077 +0000
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     4439,
  /**/

-- 
>From "know your smileys":
 *<|:-) Santa Claus (Ho Ho Ho)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220222123744.418AF1C14C4%40moolenaar.net.

Raspunde prin e-mail lui