Mercurial > vim
view runtime/spell/es/main.aap @ 35308:22c03485f222 v9.1.0456
patch 9.1.0456: Left shift is incorrect with vartabstop and shiftwidth=0
Commit: https://github.com/vim/vim/commit/88d4f255b7b7a19bb4f6489e0ad0956e47d51fed
Author: Gary Johnson <garyjohn@spocom.com>
Date: Sat Jun 1 20:51:33 2024 +0200
patch 9.1.0456: Left shift is incorrect with vartabstop and shiftwidth=0
Problem: Left shift is incorrect with vartabstop and shiftwidth=0
Solution: make tabstop_at() function aware of shift direction
(Gary Johnson)
The problem was that with 'vartabstop' set and 'shiftwidth' equal 0,
left shifts using << were shifting the line to the wrong column. The
tabstop to the right of the first character in the line was being used
as the shift amount instead of the tabstop to the left of that first
character.
The reason was that the tabstop_at() function always returned the value
of the tabstop to the right of the given column and was not accounting
for the direction of the shift.
The solution was to make tabstop_at() aware of the direction of the
shift and to choose the tabtop accordingly.
A test was added to check this behavior and make sure it doesn't
regress.
While at it, also fix a few indentation/alignment issues.
fixes: #14864
closes: #14887
Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 01 Jun 2024 21:00:03 +0200 |
parents | b9e314fe473f |
children |
line wrap: on
line source
# Aap recipe for Spanish Vim spell files. # Use a freshly compiled Vim if it exists. @if os.path.exists('../../../src/vim'): VIM = ../../../src/vim @else: :progsearch VIM vim REGIONS = ES MX ES_REGIONS = es_$*REGIONS SPELLDIR = .. FILES = es_$*(REGIONS).aff es_$*(REGIONS).dic ZIPFILE_ES = es_ES.zip ZIPFILE_MX = es_MX.zip ZIPFILES = $ZIPFILE_ES $ZIPFILE_MX READMES = README_es_$*(REGIONS).txt all: $SPELLDIR/es.latin1.spl $SPELLDIR/es.utf-8.spl ../README_es.txt $SPELLDIR/es.latin1.spl : $FILES :sys env LANG=es_ES.ISO8859-1 $VIM -u NONE -e -c "mkspell! $SPELLDIR/es $ES_REGIONS" -c q $SPELLDIR/es.utf-8.spl : $FILES :sys env LANG=es_ES.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/es $ES_REGIONS" -c q ../README_es.txt: $READMES :print es_ES >! $target :cat README_es_ES.txt >> $target :print =================================================== >>$target :print es_MX >> $target :cat README_es_MX.txt >> $target # # Fetching the files from the OpenOffice.org site. # The OLDSPELL file comes from elsewhere # OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries :attr {fetch = $OODIR/%file%} $ZIPFILES # The files don't depend on the .zip file so that we can delete it. # Only download the zip file if the targets don't exist. es_ES.aff es_ES.dic: {buildcheck=} :assertpkg unzip patch :fetch $ZIPFILE_ES :sys $UNZIP $ZIPFILE_ES :delete Changelog_es_ES.txt :delete $ZIPFILE_ES @if not os.path.exists('es_ES.orig.aff'): :copy es_ES.aff es_ES.orig.aff @if not os.path.exists('es_ES.orig.dic'): :copy es_ES.dic es_ES.orig.dic @if os.path.exists('es_ES.diff'): :sys patch <es_ES.diff es_MX.aff es_MX.dic: {buildcheck=} :assertpkg unzip patch :fetch $ZIPFILE_MX :print No copyright information for es_MX wordlist >! README_es_MX.txt :sys $UNZIP $ZIPFILE_MX :delete $ZIPFILE_MX :sys $VIM -u NONE -e -c "set ff=unix | wq" es_MX.dic @if not os.path.exists('es_MX.orig.aff'): :copy es_MX.aff es_MX.orig.aff @if not os.path.exists('es_MX.orig.dic'): :copy es_MX.dic es_MX.orig.dic @if os.path.exists('es_MX.diff'): :sys patch <es_MX.diff # Generate diff files, so that others can get the OpenOffice files and apply # the diffs to get the Vim versions. diff: :assertpkg diff :sys {force} diff -a -C 1 es_ES.orig.aff es_ES.aff >es_ES.diff :sys {force} diff -a -C 1 es_ES.orig.dic es_ES.dic >>es_ES.diff :sys {force} diff -a -C 1 es_MX.orig.aff es_MX.aff >es_MX.diff :sys {force} diff -a -C 1 es_MX.orig.dic es_MX.dic >>es_MX.diff # Check for updated OpenOffice spell files. When there are changes the # ".new.aff" and ".new.dic" files are left behind for manual inspection. check: :print TODO!!!! # vim: set sts=4 sw=4 :