- fix readability issue with IncSearch/CurSearch
- add highlights to some of ftplugins distributed with vim
closes: #19295
Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: blob2str() does not handle UTF-16 encoding
(Hirohito Higashi)
Solution: Refactor the code and fix remaining issues, see below
(Yasuhiro Matsumoto).
blob2str() function did not properly handle UTF-16/UCS-2/UTF-32/UCS-4
encodings with endianness suffixes (e.g., utf-16le, utf-16be, ucs-2le).
The encoding name was canonicalized too aggressively, losing the
endianness information needed by iconv.
This change include few fixes:
- Preserve the raw encoding name with endianness suffix for iconv calls
- Normalize encoding names properly: "ucs2be" → "ucs-2be", "utf16le" →
"utf-16le"
- For multi-byte encodings (UTF-16/32, UCS-2/4), convert the entire blob
first, then split by newlines
convert_string() cannot handle UTF-16 because it uses string_convert()
which expects NUL-terminated strings. UTF-16 contains 0x00 bytes within
characters (e.g., "H" = 0x48 0x00), causing premature termination.
Therefore, for UTF-16/32 encodings, the fix uses string_convert_ext()
with an explicit input length to convert the entire blob at once.
The code appends two NUL bytes (ga_append(&blob_ga, NUL) twice) because
UTF-16 requires a 2-byte NUL terminator (0x00 0x00), not a single-byte
NUL.
- src/strings.c: Add from_encoding_raw to preserve endianness, special
handling for UTF-16/32 and UCS-2/4
- src/mbyte.c: Fix convert_setup_ext() to use == ENC_UNICODE instead of
& ENC_UNICODE. The bitwise AND was incorrectly treating UTF-16/UCS-2
(which have ENC_UNICODE + ENC_2BYTE etc.) as UTF-8, causing iconv
setup to be skipped.
fixes: #19198closes: #19246
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Use standard indent and remove unnecessary bang.
closes: #19285
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: modeless selection not copied to * register when P in
guioptions (Coacher)
Solution: Make the "P" flag override the "a" and "A" flag
(Foxe Chen)
fixes: #19187closes: #19244
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This includes macros, keys etc. which were not highlighted before.
closes: #19276
Signed-off-by: Muntasir Mahmud <muntasir.joypurhat@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
indent/rust.vim behaves incorrectly when a string literal contains the
substring "if".
For example, in this code:
let x = "
motif
";
struct X {
}
indent/rust.vim thinks that the closing "}" should line up with "motif".
This patch fixes the issue by checking whether the "if" is in a string
literal or comment before considering it to be a match for a subsequent
brace (and also by requiring it to start on a word boundary).
Add an indent test to ensure this does not regress.
closes: #19265
Signed-off-by: taylor.fish <contact@taylor.fish>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Also add syntax tests for those newly constants.
closes: #17788closes: #18922
Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Add "-" to iskeyword. This required a change to the syntax files too
because they were using the word begin and end atoms.
closes: #17259
Co-authored-by: Teemu Ikonen <tpikonen@mailbox.org>
Co-authored-by: A4-Tacks <wdsjxhno1001@163.com>
Signed-off-by: Aman Verma <amanraoverma@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: skhd files are not recognized
Solution: Detect .skhdrc and skhdrc as skhd filetype,
include a syntax and filetype plugin, add syntax tests
(Kiyoon Kim)
Add syntax highlighting for skhd (simple hotkey daemon for macOS)
configuration files. Includes filetype detection for skhdrc and
.skhdrc files.
Reference:
- https://github.com/asmvik/skhdcloses: #19235
Signed-off-by: Kiyoon Kim <kiyoon@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Several runtime files with "_utf-8" in their filename are actually encoded
in latin1 or cp1255, not UTF-8. This causes errors when tools attempt to
read these files as UTF-8.
Files converted:
- esperanto_utf-8.vim: latin1 -> UTF-8, updated scriptencoding directive
- greek_utf-8.vim: latin1 -> UTF-8
- hebrewp_utf-8.vim: cp1255 (Windows Hebrew) -> UTF-8
- menu_ca.utf-8.vim: latin1 -> UTF-8
- menu_ca_es.utf-8.vim: latin1 -> UTF-8
- menu_pt_pt.utf-8.vim: latin1 -> UTF-8
The actual functionality remains unchanged - only the encoding was modified.
closes: #16390
Signed-off-by: ThanhNguyxn <thanhnguyentuan2007@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Allow for an unparenthesised expression argument to the 'if',
'if-then', and 'while' commands. This is undocumented, and probably
unintended, behaviour but is frequently seen in the wild.
- Allow for a continued-line expression argument to the 'if-then'
command.
related: #19172 (csh: Support negated if in matchit)
closes: #19190
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Changes to debcontrol:
- Only use debcontrolEmail for Maintainer/Uploaders
- Add Build-Driver to debcontrolField
- Add Protected to debcontrolStrictField
- Remove Uploaders from the more generic region
- Add explicit support for highlighting build profiles
- Add explicit support for highlighting architecture specifications
- Fix URL for sections.822
Changes to debversions:
- Move plucky to unsupported
closes: #19228
Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: When using netrw to navigate directories, vim immediately
creates, then deletes a swap file in the entered directory,
causing the lastModifiedTime of that directory to change.
Solution: Use the :noswapfile command modifier in s:NetrwEditFile()
fixes: #18854
Signed-off-by: Christian Brabandt <cb@256bit.org>
I've updated the Japanese translation for the Vim 9.2 release. The
content contained in this PR was created collaboratively by multiple
peoples in the vim-jp/lang-ja project, and I, koron (Muraoka Taro), am
submitting it as the project representative.
The PR used for this work is https://github.com/vim-jp/lang-ja/pull/171.
(Please note that the communication in this PR is in Japanese)
closes: #19215
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: There is an unavailable "Sponsor/Register" item in the Help
menu.
Solution: The item name has been unified to "Sponsor".
The item names of tlmenu, which are only valid in terminal mode, were
not updated, so unnecessary items that were unavailable were displayed.
This item is also very confusing when creating menu translations.
In addition, the indentation of an item with the same name in the
regular menu has been corrected.
closes: #19201
Signed-off-by: MURAOKA Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: sh_10 fails on MacOS runners (after 16c2279062)
because dash does not exist on MacOS
Solution: Force the test to use bash shebang line
Signed-off-by: Christian Brabandt <cb@256bit.org>