]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1101: insexpand.c hard to read v9.1.1101
authorglepnir <glephunter@gmail.com>
Mon, 10 Feb 2025 21:18:00 +0000 (22:18 +0100)
committerChristian Brabandt <cb@256bit.org>
Mon, 10 Feb 2025 21:18:00 +0000 (22:18 +0100)
commit40891bac5d4760e97ff59cd6264f6f00437536e8
tree42f20d0d840be867c8ec30f981b01bf8ce301c73
parent35e02af7bf3086b7ad572113fd7c647535bd6605
patch 9.1.1101: insexpand.c hard to read

Problem:  insexpand.c hard to read
Solution: refactor slightly to make it better readable
          (glepnir)

Problem:
- Complex while loops with nested conditions
- Redundant if branches
- Hard to understand and maintain

Solution:
- Restructure using while(true) with clear break conditions
- Using ternary to replace some if conditions
- Add descriptive comments for each step

closes: #16600

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/insexpand.c
src/version.c