Mercurial > vim
annotate src/testdir/test_comparators.vim @ 21110:8fb0e507491d v8.2.1106
patch 8.2.1106: crash when trying to use s: variable in typed command
Commit: https://github.com/vim/vim/commit/8e6cbb72324b6fb25d1a9abd6cc4d102d0e5f14e
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 1 14:38:12 2020 +0200
patch 8.2.1106: crash when trying to use s: variable in typed command
Problem: Crash when trying to use s: variable in typed command.
Solution: Don't use the script index when not set. (Ken Takata,
closes #6366)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 01 Jul 2020 14:45:05 +0200 |
parents | 140d51d5b5c3 |
children | 08940efa6b4e |
rev | line source |
---|---|
11651
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 function Test_Comparators() |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 try |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 let oldisident=&isident |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 set isident+=# |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 call assert_equal(1, 1 is#1) |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 finally |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 let &isident=oldisident |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 endtry |
140d51d5b5c3
patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 endfunction |