Mercurial > vim
comparison src/testdir/test_textformat.vim @ 28767:7bbd859b2a48 v8.2.4908
patch 8.2.4908: no text formatting for // comment after a statement
Commit: https://github.com/vim/vim/commit/48a8a833033e10fc1eba96f2fc8dd19c2408eddf
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 7 15:43:52 2022 +0100
patch 8.2.4908: no text formatting for // comment after a statement
Problem: No text formatting for // comment after a statement.
Solution: format a comment when the 'c' flag is in 'formatoptions'.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 07 May 2022 16:45:02 +0200 |
parents | 38698deeda58 |
children | 864fa5276e78 |
comparison
equal
deleted
inserted
replaced
28766:f708e1986aef | 28767:7bbd859b2a48 |
---|---|
337 exe "normal! 2Go\<C-U>x\<Esc>" | 337 exe "normal! 2Go\<C-U>x\<Esc>" |
338 let expected =<< trim END | 338 let expected =<< trim END |
339 { | 339 { |
340 val = val; // This is a comment | 340 val = val; // This is a comment |
341 x | 341 x |
342 END | |
343 call assert_equal(expected, getline(1, '$')) | |
344 | |
345 " typing comment text auto-wraps | |
346 %del | |
347 call setline(1, text) | |
348 exe "normal! 2GA blah more text blah.\<Esc>" | |
349 let expected =<< trim END | |
350 { | |
351 val = val; // This is a comment | |
352 // blah more text | |
353 // blah. | |
342 END | 354 END |
343 call assert_equal(expected, getline(1, '$')) | 355 call assert_equal(expected, getline(1, '$')) |
344 | 356 |
345 bwipe! | 357 bwipe! |
346 endfunc | 358 endfunc |