File tree Expand file tree Collapse file tree 3 files changed +25
-3
lines changed
Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -960,7 +960,7 @@ vim_isfilec_or_wc(int c)
960960}
961961
962962/*
963- * return TRUE if 'c' is a printable character
963+ * Return TRUE if 'c' is a printable character.
964964 * Assume characters above 0x100 are printable (multi-byte), except for
965965 * Unicode.
966966 */
@@ -1717,7 +1717,7 @@ vim_toupper(int c)
17171717{
17181718 if (c <= '@' )
17191719 return c ;
1720- if (c >= 0x80 )
1720+ if (c >= 0x80 || !( cmp_flags & CMP_KEEPASCII ) )
17211721 {
17221722 if (enc_utf8 )
17231723 return utf_toupper (c );
@@ -1741,7 +1741,7 @@ vim_tolower(int c)
17411741{
17421742 if (c <= '@' )
17431743 return c ;
1744- if (c >= 0x80 )
1744+ if (c >= 0x80 || !( cmp_flags & CMP_KEEPASCII ) )
17451745 {
17461746 if (enc_utf8 )
17471747 return utf_tolower (c );
Original file line number Diff line number Diff line change @@ -1603,6 +1603,26 @@ fun! Test_normal30_changecase()
16031603 norm! V~
16041604 call assert_equal (' THIS IS A simple test: äüöss' , getline (' .' ))
16051605
1606+ " Turkish ASCII turns to multi-byte.
1607+ try
1608+ lang tr_TR.UTF- 8
1609+ set casemap =
1610+ call setline (1 , ' iI' )
1611+ 1 normal gUU
1612+ call assert_equal (" \u0130 I" , getline (1 ))
1613+ call assert_equal (" \u0130 I" , toupper (" iI" ))
1614+
1615+ call setline (1 , ' iI' )
1616+ 1 normal guu
1617+ call assert_equal (" i\u0131 " , getline (1 ))
1618+ call assert_equal (" i\u0131 " , tolower (" iI" ))
1619+
1620+ lang en_US.UTF- 8
1621+ catch /E197:/
1622+ " can't use Turkish locale
1623+ throw ' Skipped: Turkish locale not available'
1624+ endtry
1625+
16061626 " clean up
16071627 bw !
16081628endfunc
Original file line number Diff line number Diff line change @@ -764,6 +764,8 @@ static char *(features[]) =
764764
765765static int included_patches [] =
766766{ /* Add new patch number below this line */
767+ /**/
768+ 552 ,
767769/**/
768770 551 ,
769771/**/
You can’t perform that action at this time.
0 commit comments