]> git.madduck.net Git - etc/vim.git/blobdiff - test/toc-autofit.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge pull request #297 from KainokiKaede/master
[etc/vim.git] / test / toc-autofit.vader
index 166cc81618c0435bd849455a58bebddbae63517c..26789975625e637558419284dea59c9b13f58fac 100644 (file)
@@ -43,10 +43,11 @@ Execute (toc window autofit width):
   let line = '###### chap 12.1.1.1.1.1'
   AssertEqual getline('33'), line
   :Toc
   let line = '###### chap 12.1.1.1.1.1'
   AssertEqual getline('33'), line
   :Toc
-  let real_width = &winwidth
+  let real_width = winwidth(0)
   :lclose
   let expected_width = len(line) + 2*5 + 1 + 3 - 7
   AssertEqual real_width, expected_width
   :lclose
   let expected_width = len(line) + 2*5 + 1 + 3 - 7
   AssertEqual real_width, expected_width
+  set nonumber
 " 2 spaces * 5 additional header levels + 1 space for first header +
 " 3 spaces for line numbers - 7 chars ('###### ') that don't show up on the TOC
 
 " 2 spaces * 5 additional header levels + 1 space for first header +
 " 3 spaces for line numbers - 7 chars ('###### ') that don't show up on the TOC