Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] p in visual line appends unnecessary newline #2609

Merged
merged 3 commits into from
May 4, 2018

Conversation

tyru
Copy link
Contributor

@tyru tyru commented May 4, 2018

What this PR does / why we need it

hello
world

Typing ggddVp results in


world
hello

The behavior of the issue (#2608) was changed by #2601, but it's wrong yet.

After this PR is merged, the result is (no newline at the beginning or end)

world
hello

Which issue(s) this PR fixes

Fixes #2608

@TravisBuddy
Copy link

Travis tests have failed

Hey @tyru,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

Node.js: 8

npm test --silent;
### VS Code Extension Test Run ###
Current working directory: /home/travis/build/VSCodeVim/Vim
Downloading VS Code into "/home/travis/build/VSCodeVim/Vim/.vscode-test/stable" from: https://vscode-update.azurewebsites.net/1.23.0/linux-x64/stable
Running extension tests: /home/travis/build/VSCodeVim/Vim/.vscode-test/stable/VSCode-linux-x64/code /home/travis/build/VSCodeVim/Vim/out/test --extensionDevelopmentPath=/home/travis/build/VSCodeVim/Vim --extensionTestsPath=/home/travis/build/VSCodeVim/Vim/out/test
Xlib:  extension "RANDR" missing on display ":99.0".

Xlib:  extension "RANDR" missing on display ":99.0".

[main 3:49:39 AM] update#setState idle

bash: cannot set terminal process group (-1): Inappropriate ioctl for device

bash: no job control in this shell

nvm is not compatible with the "npm_config_prefix" environment variable: currently set to "/home/travis/.nvm/versions/node/v8.11.1"
Run `unset npm_config_prefix` to unset it.





  base action

    ✓ compare key presses

    ✓ couldActionApply 1D keys positive

    ✓ couldActionApply 1D keys negative
    ✓ couldActionApply 2D keys positive
    ✓ couldActionApply 2D keys negative
    ✓ doesActionApply 1D keys positive
    ✓ doesActionApply 1D keys negative

    ✓ doesActionApply 2D keys positive
    ✓ doesActionApply 2D keys negative


  command-line lexer
    ✓ can lex empty string
    ✓ can lex comma
    ✓ can lex percent
    ✓ can lex dollar
    ✓ can lex dot
    ✓ can lex one number

    ✓ can lex longer number
    ✓ can lex plus
    ✓ can lex minus
    ✓ can lex forward search
    ✓ can lex forward search escaping
    ✓ can lex reverse search
    ✓ can lex reverse search escaping
    ✓ can lex command name
    ✓ can lex command args

    ✓ can lex command args with leading whitespace

    ✓ can lex long command name and args

    ✓ can lex left and right line refs



  command-line parser

    ✓ can parse empty string

    ✓ can parse left - dot

    ✓ can parse left - dollar

    ✓ can parse left - percent

    ✓ can parse separator - comma

    ✓ can parse right - dollar



  command line scanner

    ✓ ctor

    ✓ can detect EOF with empty input

    ✓ next() returns EOF at EOF

    ✓ can scan

    ✓ can emit

    ✓ can ignore

    ✓ can skip whitespace

    ✓ can skip whitespace with one char before EOF

    ✓ can skip whitespace at EOF

    ✓ nextWord() return EOF at EOF

    ✓ nextWord() return word before trailing spaces

    ✓ nextWord() can skip whitespaces and return word 

    ✓ nextWord() return word before EOF

    ✓ can expect one of a set

    ✓ can expect only one of a set



  Basic sort

    ✓ Sort whole file, asc (302ms)

    ✓ Sort whole file, dsc (216ms)

    ✓ Sort range, asc (244ms)

    ✓ Sort range, dsc (220ms)



  :close args parser

    ✓ has all aliases

    ✓ can parse empty args

    ✓ ignores trailing white space

    ✓ can parse !

    ✓ throws if space before !

    ✓ ignores space after !

    ✓ throws if bad input



  :quit args parser

    ✓ has all aliases

    ✓ can parse empty args

    ✓ ignores trailing white space

    ✓ can parse !

    ✓ throws if space before !

    ✓ ignores space after !

    ✓ throws if bad input



  :substitute args parser

    ✓ can parse pattern, replace, and flags

    ✓ can parse count

    ✓ can parse custom delimiter

    ✓ can escape delimiter

    ✓ can parse flag KeepPreviousFlags



  :write args parser

    ✓ has all aliases

    ✓ can parse empty args

    ✓ can parse ++opt

    ✓ throws if bad ++opt name

    ✓ can parse bang

    ✓ can parse ' !cmd'

    ✓ can parse ' !cmd' when cmd is empty



  Basic substitute

    ✓ Replace single word once (105ms)

    ✓ Replace with `g` flag (147ms)

    ✓ Replace multiple lines (210ms)

    ✓ Replace across specific lines (157ms)

    ✓ Replace current line with no active selection (181ms)

    ✓ Replace text in selection (256ms)

    ✓ Substitute support marks (207ms)

    Effects of substituteGlobalFlag=true

      ✓ Replace all matches in the line (131ms)

      ✓ Replace with `g` flag inverts global flag (116ms)

      ✓ Replace multiple lines (147ms)

      ✓ Replace across specific lines (143ms)

      ✓ Replace current line with no active selection (165ms)

      ✓ Replace text in selection (250ms)

      ✓ Substitute support marks (181ms)

      ✓ Substitute with escaped delimiter (148ms)

    Substitute with empty search string should use previous search

      ✓ Substitute with previous search using * (317ms)

      ✓ Substitute with previous search using # (382ms)

      ✓ Substitute with previous search using / (359ms)

      ✓ Substitute with empty search string should use last searched pattern (292ms)


  cmd_line tab

    ✓ tabe with no arguments when not in workspace opens an untitled file (48ms)

    ✓ tabedit with no arguments when not in workspace opens an untitled file

    ✓ tabe with absolute path when not in workspace opens file (60ms)

    ✓ tabe with current file path does nothing (60ms)



  Vertical split

    ✓ Run :vs (72ms)

    ✓ Run :vsp (54ms)


  Basic write-quit

    ✓ Run write and quit (178ms)



  Configuration

    ✓ remappings are normalized



  Notation

    ✓ Normalize



  Remapper

Something bad happened in removeChange

    ✓ jj -> <Esc> (42ms)

    ✓ remapped command with leader 

  Error
    ✓ error code has message

  package.json

    ✓ all keys have handlers

    ✓ all defined configurations in package.json have handlers



  Record and execute a macro

    ✓ Can record and execute (318ms)

    ✓ Can repeat last invoked macro (464ms)

    ✓ Can play back with count (531ms)

    ✓ Can play back with count, abort when a motion fails (662ms)

    ✓ Repeat change on contiguous lines (326ms)

    ✓ Append command to a macro (458ms)

    ✓ Can record Ctrl Keys and repeat (310ms)

    ✓ Can execute macros with dot commands properly (193ms)


  Mode Handler

    ✓ ctor

    ✓ can set current mode



  Mode Handler Map

    ✓ getOrCreate



  Mode Insert

    ✓ can be activated (135ms)

    ✓ can handle key events

    ✓ <Esc> should change cursor position (75ms)

    ✓ <C-c> can exit insert (139ms)

    ✓ <Esc> can exit insert (89ms)

    ✓ Stay in insert when entering characters (153ms)

    ✓ Can handle 'O' (118ms)

    ✓ Can handle 'i' (142ms)

    ✓ Can handle 'I' (144ms)

    ✓ Can handle 'a' (223ms)

    ✓ Can handle 'A' (93ms)

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

    ✓ Can handle '<C-w>' (240ms)

    ✓ Can handle <C-w> on leading whitespace (118ms)

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

    ✓ Can handle <C-w> at beginning of line (95ms)

    ✓ Correctly places the cursor after deleting the previous line break (165ms)

    ✓ will not remove leading spaces input by user (49ms)

    ✓ will remove closing bracket (75ms)

    ✓ Backspace works on whitespace only lines (106ms)

    ✓ Backspace works on end of whitespace only lines (136ms)

    ✓ Backspace works at beginning of file (53ms)

    ✓ Can perform <ctrl+o> to exit and perform one command in normal (168ms)

    ✓ Can perform <ctrl+o> to exit and perform one command in normal at the beginning of a row (135ms)

    ✓ Can perform insert command prefixed with count (161ms)

    ✓ Can perform append command prefixed with count (154ms)

    ✓ Can perform insert at start of line command prefixed with count (204ms)

    ✓ Can perform append to end of line command prefixed with count (339ms)

Text transformations are overlapping. Falling back to serial
           transformations. This is generally a very bad sign. Try to make
           your text transformations operate on non-overlapping ranges.

    ✓ Can perform change char (s) command prefixed with count (214ms)

    ✓ Can perform command prefixed with count with <C-[> (110ms)

    ✓ Can handle 'o' with count (190ms)

    ✓ Can handle 'O' with count (154ms)



  Mode Normal

    ✓ Can be activated (46ms)

    ✓ Can handle % (87ms)

    ✓ Can handle % before opening brace (69ms)

    ✓ Can handle % nested inside parens (70ms)

    ✓ Can handle dw (96ms)

    ✓ Can handle dw (126ms)

    ✓ Can handle dw (173ms)

    ✓ Can handle dw across lines (1) (138ms)

    ✓ Can handle dw across lines (2) (128ms)

    ✓ Can handle dd last line (84ms)

    ✓ Can handle dd single line (66ms)

    ✓ Can handle dd (77ms)

    ✓ Can handle 3dd (74ms)

    ✓ Can handle 3dd off end of document (94ms)

    ✓ Can handle d2d (63ms)

    ✓ Can handle dd empty line (86ms)

    ✓ Can handle ddp (76ms)

    ✓ Can handle 'de' (139ms)

[main 3:50:09 AM] update#setState checking for updates

    ✓ Can handle 'de' then 'de' again (148ms)

    ✓ Can handle 'db' (143ms)

[main 3:50:10 AM] update#setState idle

    ✓ Can handle 'db then 'db' again (145ms)

    ✓ Can handle 'dl' at end of line (131ms)

    ✓ Can handle 'dF' (117ms)

    ✓ Can handle 'dT' (125ms)

    ✓ Can handle 'd3' then <enter> (133ms)

    ✓ Can handle 'dj' (94ms)

    ✓ Can handle 'dk' (132ms)

    ✓ Can handle 'cw' (246ms)

    ✓ Can handle 'cw' without deleting following white spaces (65ms)

    ✓ Can handle 'c2w' (72ms)

    ✓ Can handle 'cw' without removing EOL (136ms)

    ✓ Can handle 's' (239ms)

    ✓ Can handle 'yiw' with correct cursor ending position (112ms)

    ✓ Can handle 'ciw' (368ms)

    ✓ Can handle 'ciw' on blanks (220ms)

    ✓ Can handle 'caw' (246ms)

    ✓ Can handle 'caw' on first letter (180ms)

    ✓ Can handle 'caw' on blanks (158ms)

    ✓ Can handle 'caw' on blanks (97ms)

    ✓ Can handle 'ci(' on first parentheses (121ms)

    ✓ Can handle 'ci(' with nested parentheses (112ms)

    ✓ Can handle 'ci(' backwards through nested parens (156ms)

    ✓ Can handle 'cib' on first parentheses (100ms)

    ✓ Can handle 'ci(' across multiple lines with last character at beginning (110ms)

    ✓ Can handle 'ca(' spanning multiple lines (187ms)

    ✓ Can handle 'cab' spanning multiple lines (99ms)

    ✓ Can handle 'ci{' spanning multiple lines (74ms)

    ✓ Can handle 'ci{' spanning multiple lines and handle whitespaces correctly (88ms)

    ✓ Can handle 'ci{' spanning multiple lines and handle whitespaces correctly (95ms)

    ✓ Can handle 'ci(' on the closing bracket (132ms)

    ✓ Can handle 'ciB' spanning multiple lines (86ms)

    ✓ will fail when ca( with no () (60ms)

    ✓ will fail when ca{ with no {} (61ms)

    ✓ will fail when caB with no {} (76ms)

    ✓ Can handle 'ci[' spanning multiple lines (126ms)

    ✓ Can handle 'ci]' on first bracket (91ms)

    ✓ Can handle 'ca[' on first bracket (161ms)

    ✓ Can handle 'ca]' on first bracket (214ms)

    ✓ Can handle 'ci'' on first quote (110ms)

    ✓ Can handle 'ci'' inside quoted string (117ms)

    ✓ Can handle 'ci'' on closing quote (141ms)

    ✓ Can handle 'ci'' when string is ahead (92ms)

    ✓ Can handle 'ci"' on opening quote (79ms)

    ✓ Can handle 'ci"' starting behind the quoted word (121ms)

    ✓ Can handle 'ca"' starting behind the quoted word (65ms)

    ✓ Can handle 'ca"' starting on the opening quote (207ms)

    ✓ Can handle 'ci"' with escaped quotes (163ms)

    ✓ Can handle 'ci"' with a single escaped quote (108ms)

    ✓ Can handle 'ci"' with a single escaped quote behind (248ms)

    ✓ Can handle 'ci"' with an escaped backslash (253ms)

    ✓ Can handle 'ci"' with an escaped backslash on closing quote (93ms)

    ✓ Can handle 'ca"' starting on the closing quote (138ms)

    ✓ Can handle 'ci"' with complex escape sequences (143ms)

    ✓ Can pick the correct open quote between two strings for 'ci"' (174ms)

    ✓ will fail when ca" ahead of quoted string (129ms)

    ✓ Can handle 'ca`' inside word (138ms)

    ✓ Can handle 'daw' on word with cursor inside spaces (194ms)

    ✓ Can handle 'daw' on word with trailing spaces (285ms)

    ✓ Can handle 'daw' on word with leading spaces (279ms)

    ✓ Can handle 'daw' on word with numeric prefix (112ms)

    ✓ Can handle 'daw' on word with numeric prefix and across lines (331ms)

    ✓ Can handle 'daw' on word with numeric prefix and across lines (207ms)

    ✓ Can handle 'daw' on word with numeric prefix and across lines, containing words end with `.` (325ms)

    ✓ Can handle 'daw' on end of word (367ms)

    ✓ Can handle 'daw' on words at beginning of line with leading whitespace (163ms)

    ✓ Can handle 'daw' on words at ends of lines in the middle of whitespace (150ms)

    ✓ Can handle 'daw' on word at beginning of file (109ms)

    ✓ Can handle 'daw' on word at beginning of line (141ms)

    ✓ Can handle 'daw' on word at end of line with trailing whitespace (185ms)

    ✓ Can handle 'daw' around word at end of line (168ms)

    ✓ Can handle 'daW' on big word with cursor inside spaces (166ms)

    ✓ Can handle 'daW' around word at whitespace (158ms)

    ✓ Can handle 'daW' on word with trailing spaces (142ms)

    ✓ Can handle 'daW' on word with leading spaces (249ms)

    ✓ Can handle 'daW' on word with numeric prefix (113ms)

    ✓ Can handle 'daW' on word with numeric prefix and across lines (471ms)

    ✓ Can handle 'daW' on beginning of word (130ms)

    ✓ Can handle 'daW' on end of one line (149ms)

    ✓ Can handle 'daW' around word at the last WORD (t|wo) (136ms)

    ✓ Can handle 'daW' around word at the last WORD (tw|o) (124ms)

    ✓ Can handle 'daW' around word at the last WORD (class="btn"|>) (208ms)

    ✓ Can handle 'daW' around word at the last WORD of the end of document (class="btn"|>) (225ms)

    ✓ Can handle 'daW' around word at the last WORD (c|lass="btn">) (131ms)

    ✓ Can handle 'daW' around word at the last WORD of the end of document (c|lass="btn">) (196ms)

    ✓ Can handle 'diw' on word with cursor inside spaces (228ms)

    ✓ Can handle 'diw' on word (221ms)

    ✓ Can handle 'diw' on word with numeric prefix (237ms)

    ✓ Can handle 'diw' on trailing spaces at the end of line (304ms)

    ✓ Can handle 'diw' on word with numeric prefix and across lines (292ms)

    ✓ Can handle 'diw' on word with numeric prefix and across lines, containing words end with `.` (289ms)

    ✓ Can handle 'diW' on big word with cursor inside spaces (163ms)

    ✓ Can handle 'diW' on word with trailing spaces (209ms)

    ✓ Can handle 'diW' on word with leading spaces (252ms)

    ✓ Can handle 'diW' on word with numeric prefix (130ms)

    ✓ Can handle 'diW' on word with numeric prefix and across lines (336ms)

    ✓ Can handle 'diW' on beginning of word (129ms)

    ✓ Can handle d} (129ms)

    ✓ Can handle y} at beginning of line (210ms)

    ✓ Select sentence with trailing spaces (294ms)

    ✓ Select sentence with leading spaces (481ms)

    ✓ Select inner sentence with trailing spaces (234ms)

    ✓ Select inner sentence with leading spaces (446ms)

    ✓ Select spaces between sentences (426ms)

    ✓ Can handle 'df' (259ms)

    ✓ Can handle 'dt' (260ms)

    ✓ Can handle backspace (146ms)

    ✓ Can handle backspace across lines (165ms)

    ✓ Can handle A and backspace (76ms)

    ✓ Can handle 'yy' without changing cursor position (179ms)

    ✓ Can handle 'P' after 'yy' (191ms)

    ✓ Can handle 'p' after 'yy' (122ms)

    ✓ Can handle 'P' after 'Nyy' (119ms)

    ✓ Can handle 'p' after 'Nyy' (114ms)

    ✓ Can handle 'p' after 'yy' with correct cursor position (79ms)

    ✓ Can handle 'gp' after 'yy' (108ms)

    ✓ Can handle 'gp' after 'Nyy' (98ms)

    ✓ Can handle 'gp' after 'Nyy' if cursor is on the last line (119ms)

    ✓ Can handle 'gP' after 'yy' (143ms)

    ✓ Can handle 'gP' after 'Nyy' (165ms)

    ✓ Can handle ']p' after yy (185ms)

    ✓ Can handle ']p' after 'Nyy' (254ms)

    ✓ Can handle ']p' after 'Nyy' and indent with tabs first (110ms)

    ✓ Can handle ']p' after 'Nyy' and decrease indents if possible (133ms)

    ✓ Can handle '[p' after yy (159ms)

    ✓ Can handle '[p' after 'Nyy' (176ms)

    ✓ Can handle '[p' after 'Nyy' and indent with tabs first (146ms)

    ✓ Can handle '[p' after 'Nyy' and decrease indents if possible (149ms)

    ✓ Can handle 'p' after y'a (85ms)

    ✓ Can handle pasting in visual mode over selection (194ms)

    ✓ Can repeat w (69ms)

    ✓ Can repeat p (62ms)

    ✓ I works correctly (203ms)

    ✓ gI works correctly (138ms)

    ✓ gi works correctly (274ms)

    ✓ `. works correctly (220ms)

    ✓ '. works correctly (195ms)

    ✓ g; works correctly (248ms)

    ✓ g, works correctly (233ms)

    ✓ g_ works correctly (125ms)

    ✓ 3g_ works correctly (147ms)

    ✓ Can handle space (94ms)

    ✓ Can handle space (139ms)

    ✓ Undo 1 (268ms)

    ✓ Undo 2 (237ms)

    ✓ Undo cursor (334ms)

    ✓ Undo cursor 2 (413ms)

    ✓ Undo cursor 3 (374ms)

    ✓ Undo with movement first (244ms)

    ✓ Can handle 'U' (140ms)

    ✓ Can handle 'U' for multiple changes (241ms)

    ✓ Can handle 'U' for new line below (313ms)

    ✓ Can handle 'U' for new line above (359ms)

    ✓ Can handle 'U' for consecutive changes only (349ms)

    ✓ Can handle 'u' to undo 'U' (189ms)

    ✓ Can handle 'U' to undo 'U' (204ms)

    ✓ Redo (312ms)

    ✓ Redo (373ms)

    ✓ Redo (342ms)

    ✓ Can handle u (113ms)

    ✓ Can handle guw (81ms)

    ✓ Can handle gUw (112ms)

    ✓ Can handle u over line breaks (137ms)

    ✓ can handle s in visual mode (179ms)

    ✓ can handle p with selection (154ms)

    ✓ can handle P with selection (226ms)

    ✓ can handle p in visual to end of line (314ms)

    ✓ can repeat backspace twice (205ms)

    ✓ can delete linewise with d2G (109ms)

    ✓ can dE correctly (113ms)

    ✓ can dE correctly (109ms)

    ✓ can dE correctly (224ms)

    ✓ can ctrl-a correctly behind a word (99ms)

    ✓ can ctrl-a the right word (always the one AFTER the cursor) (126ms)

    ✓ can ctrl-a on word (247ms)

    ✓ can ctrl-a on a hex number (82ms)

    ✓ can ctrl-a on decimal (97ms)

    ✓ can ctrl-a with numeric prefix (133ms)

    ✓ can ctrl-a on a decimal (181ms)

    ✓ can ctrl-a on an octal  (144ms)

    ✓ Correctly increments in the middle of a number (108ms)

    ✓ can ctrl-x correctly behind a word (134ms)

    ✓ can ctrl-a on an number with word before  (104ms)

    ✓ can ctrl-a on an number with word before and after  (105ms)

    ✓ can ctrl-x on a negative number with word before and after  (178ms)

    ✓ can ctrl-a properly on multiple lines (194ms)

    ✓ can <C-a> on word with multiple numbers (incrementing first number) (84ms)

    ✓ can <C-a> on word with multiple numbers (incrementing second number) (202ms)

    ✓ can do Y (66ms)

    ✓ Can do S (207ms)

    ✓ / does not affect mark (98ms)

    ✓ / can search with regex (70ms)

    ✓ / can search with newline (80ms)

    ✓ / can search through multiple newlines (168ms)

    ✓ / matches ^ per line (91ms)

    ✓ / matches $ per line (86ms)

    ✓ /\c forces case insensitive search (106ms)

    ✓ /\C forces case sensitive search (121ms)

    ✓ <BS> deletes the last character in search in progress mode (109ms)

    ✓ <S-BS> deletes the last character in search in progress mode (115ms)

    ✓ <C-h> deletes the last character in search in progress mode (109ms)

    ✓ Can do C (114ms)

    ✓ Can do cit on a matching tag (331ms)

    ✓ Ignores cit on a non-matching tag (199ms)

    ✓ Ignores cit on a nested tag (192ms)

    ✓ Can do cit on a tag with an attribute tag (168ms)

    ✓ Can do cat on a matching tag (252ms)

    ✓ Can do cit on a multiline tag (172ms)

    ✓ Can do cit on a multiline tag with nested tags (264ms)

    ✓ Can do cit inside of a tag with another non closing tag inside tags (385ms)

    ✓ Can do cit inside of a tag with another empty closing tag inside tags (381ms)

    ✓ Can do dit on empty tag block, cursor moves to inside (132ms)

    ✓ Can do cit on empty tag block, cursor moves to inside (133ms)

    ✓ can do cit with self closing tags (352ms)

    ✓ Respects indentation with cc (227ms)

    ✓ can handle 'cc' on empty line (99ms)

    ✓ cc copies linewise (183ms)

    ✓ Indent current line with correct Vim Mode (141ms)

    ✓ Can handle <Esc> and do nothing (128ms)

    ✓ Can handle # on consecutive words (528ms)

    ✓ Can handle # on skipped words (859ms)

    ✓ Can 'D'elete the characters under the cursor until the end of the line (650ms)

    ✓ Can 'D'elete the characters under multiple cursors until the end of the line (796ms)

    ✓ cc on whitespace-only line clears line (150ms)

    ✓ Can do cai (524ms)

    ✓ Can do cii (254ms)

    ✓ Can do caI (678ms)

    ✓ Can do dai (560ms)

    ✓ Can do dii (231ms)

    ✓ Can do daI (585ms)

    can handle gn

      ✓ gn selects the next match text (861ms)

      ✓ gn selects the current word at |hello (968ms)

      ✓ gn selects the current word at h|ello (742ms)

      ✓ gn selects the current word at hel|lo (964ms)

      ✓ gn selects the current word at hell|o (1047ms)

      ✓ gn selects the next word at hello| (1083ms)

    can handle dgn

      ✓ dgn deletes the next match text (from first line) (301ms)

      ✓ dgn deletes the current word when cursor is at |hello (266ms)

      ✓ dgn deletes the current word when cursor is at h|ello (298ms)

      ✓ dgn deletes the current word when cursor is at hel|lo (313ms)

      ✓ dgn deletes the current word when cursor is at hell|o (350ms)

      ✓ dgn deletes the next word when cursor is at hello| (301ms)

    can handle cgn

      ✓ cgn deletes the next match text (from first line) (266ms)

      ✓ cgn deletes the current word when cursor is at |hello (223ms)

      ✓ cgn deletes the current word when cursor is at h|ello (268ms)

      ✓ cgn deletes the current word when cursor is at hel|lo (298ms)

      ✓ cgn deletes the current word when cursor is at hell|o (261ms)

      ✓ cgn deletes the next word when cursor is at hello| (229ms)

    can handle gN

      ✓ gN selects the previous match text (1305ms)

      ✓ gN selects the current word at hell|o (1191ms)

      ✓ gN selects the current word at hel|lo (1183ms)

      ✓ gN selects the current word at h|ello (1300ms)

      ✓ gN selects the current word at |hello (762ms)

      ✓ gN selects the previous word at | hello (880ms)

    can handle dgN

      ✓ dgN deletes the previous match text (from first line) (321ms)

      ✓ dgN deletes the current word when cursor is at hell|o (485ms)

      ✓ dgN deletes the current word when cursor is at hel|lo (456ms)

      ✓ dgN deletes the current word when cursor is at h|ello (347ms)

      ✓ dgN deletes the current word when cursor is at |hello (312ms)

      ✓ dgN deletes the previous word when cursor is at | hello (371ms)

    can handle cgN

      ✓ cgN deletes the previous match text (from first line) (270ms)

      ✓ cgN deletes the current word when cursor is at hell|o (334ms)

      ✓ cgN deletes the current word when cursor is at hel|lo (348ms)

      ✓ cgN deletes the current word when cursor is at h|ello (332ms)

      ✓ cgN deletes the current word when cursor is at |hello (303ms)

      ✓ cgN deletes the previous word when cursor is at | hello (428ms)



  Mode Replace

    ✓ Can activate with <insert> from Insert mode (125ms)

    ✓ Can activate with R from Normal mode (244ms)

    ✓ Can handle R (290ms)

    ✓ Can handle R past current line (360ms)

    ✓ Can handle R and exit Replace Mode (286ms)

    ✓ Can handle R across lines (518ms)

    ✓ Can handle R across lines and exit Replace Mode (474ms)

    ✓ Can handle R with {count} (401ms)

    ✓ Can handle backspace (474ms)

    ✓ Can handle backspace (555ms)

    ✓ Can handle backspace across lines (651ms)

    ✓ Can handle arrows (395ms)

    ✓ Can handle . (584ms)

    ✓ Can handle . across lines (840ms)



  Mode Visual

    ✓ can be activated (41ms)

    ✓ Can handle w (594ms)

    ✓ Can handle wd (490ms)

    ✓ Can handle x (501ms)

    ✓ Can handle x across a selection (678ms)

    ✓ Can do vwd in middle of sentence (719ms)

    ✓ Can do vwd in middle of sentence (609ms)

    ✓ Can do vwd multiple times (814ms)

    ✓ handles case where we go from selecting on right side to selecting on left side (659ms)

    ✓ Can handle H key (205ms)

    ✓ handles case where we delete over a newline (695ms)

    ✓ handles change operator (441ms)

    ✓ Can do vi) on a matching parenthesis (369ms)

    ✓ Can do va) on a matching parenthesis (440ms)

    ✓ Can do va} on a matching bracket as first character (226ms)

    ✓ Can do vi( on a matching bracket near first character (199ms)

    ✓ Can do vi{ on outer pair of nested braces (292ms)

    ✓ Can do vi{ on braces indented by 1 and preserve indent (316ms)

    ✓ Can use . to repeat indent in visual (194ms)

    ✓ Can do v_x to delete to first char (341ms)

    ✓ Can do vg_x to delete to last char with no EOL (488ms)

    ✓ Can do v3g_x to delete to last char with no EOL with count (298ms)

    ✓ Can do v$x to delete to last char including EOL (401ms)

    ✓ Can do gv to reselect previous selection (374ms)

    Vim's EOL handling is weird

      ✓ delete through eol (409ms)

      ✓ join 2 lines by deleting through eol (430ms)

      ✓ d$ doesn't delete whole line (353ms)

      ✓ vd$ does delete whole line (378ms)

      ✓ Paste over selection copies the selection (346ms)

      ✓ Paste over selection copies the selection linewise (478ms)

    Arrow keys work perfectly in Visual Mode

      ✓ Can handle <up> key (268ms)

      ✓ Can handle <down> key (281ms)

      ✓ Can handle <left> key (298ms)

      ✓ Can handle <right> key (294ms)

    handles aw in visual mode

      ✓ Can handle 'vawd' on word with cursor inside spaces (394ms)

      ✓ Can handle 'vawd' on word with trailing spaces (388ms)

      ✓ Can handle 'vawd' on word with leading spaces (513ms)

      ✓ Can handle 'vawd' on word with numeric prefix (249ms)

      ✓ Can handle 'vawd' on word with numeric prefix and across lines (792ms)

      ✓ Can handle 'vawd' on word with numeric prefix and across lines, containing words end with `.` (731ms)

    handles aW in visual mode

      ✓ Can handle 'vaWd' on big word with cursor inside spaces (416ms)

      ✓ Can handle 'vaWd' on word with trailing spaces (421ms)

      ✓ Can handle 'vaWd' on word with leading spaces (436ms)

      ✓ Can handle 'vaWd' on word with numeric prefix (201ms)

      ✓ Can handle 'vaWd' on word with numeric prefix and across lines (601ms)

    handles aW in visual mode

      ✓ Can handle 'vaWd' on big word with cursor inside spaces (399ms)

      ✓ Can handle 'vaWd' on word with trailing spaces (338ms)

      ✓ Can handle 'vaWd' on word with leading spaces (678ms)

      ✓ Can handle 'vaWd' on word with numeric prefix (246ms)

      ✓ Can handle 'vaWd' on word with numeric prefix and across lines (688ms)

    handles aw in visual mode

      ✓ Can handle 'vawd' on word with cursor inside spaces (368ms)

      ✓ Can handle 'vawd' on word with trailing spaces (298ms)

      ✓ Can handle 'vawd' on word with leading spaces (413ms)

      ✓ Can handle 'vawd' on word with numeric prefix (220ms)

      ✓ Can handle 'vawd' on word with numeric prefix and across lines (629ms)

      ✓ Can handle 'vawd' on word with numeric prefix and across lines, containing words end with `.` (729ms)

    handles aW in visual mode

      ✓ Can handle 'vaWd' on big word with cursor inside spaces (396ms)

      ✓ Can handle 'vaWd' on word with trailing spaces (352ms)

      ✓ Can handle 'vaWd' on word with leading spaces (501ms)

      ✓ Can handle 'vaWd' on word with numeric prefix (215ms)

      ✓ Can handle 'vaWd' on word with numeric prefix and across lines (658ms)

      ✓ Can handle 'Y' in visual mode (185ms)

    handles as in visual mode

      ✓ Select sentence with trailing spaces in visual mode (438ms)

      ✓ Select sentence with leading spaces in visual mode (884ms)

      ✓ Select multiple sentences in visual mode (846ms)

    handles is in visual mode

      ✓ Select inner sentence with trailing spaces in visual mode (427ms)

      ✓ Select inner sentence with leading spaces in visual mode (808ms)

      ✓ Select spaces between sentences in visual mode (709ms)

    handles tag blocks in visual mode

      ✓ Can do vit on a matching tag (423ms)

      ✓ Can do vat on a matching tag (390ms)

    handles replace in visual mode

      ✓ Can do a single line replace (231ms)

      ✓ Can do a multi line replace (255ms)

    D command will remove all selected lines

      ✓ D deletes all selected lines (249ms)

      ✓ D deletes the current line (327ms)

    handles indent blocks in visual mode

      ✓ Can do vai (694ms)

      ✓ Can do vii (398ms)

      ✓ Doesn't naively select the next line (343ms)

      ✓ Searches backwards if cursor line is empty (221ms)

      ✓ Can do vaI (641ms)

    visualstar

      ✓ Works with * (159ms)

      ✓ Works with # (206ms)

    search works in visual mode

      ✓ Works with / (215ms)

      ✓ Works with ? (231ms)

      ✓ Selects correct range (460ms)

    X will delete linewise

      ✓ normal selection (210ms)

      ✓ normal selection (243ms)

    C will delete linewise

      ✓ normal selection (208ms)

      ✓ normal selection (326ms)

    R will delete linewise

      ✓ normal selection (216ms)

      ✓ normal selection (260ms)

    Linewise Registers will be inserted properly

      ✓ downward selection (331ms)

      ✓ upward selection (373ms)

    Non-darwin <C-c> tests

      ✓ <C-c> copies and sets mode to normal (556ms)

    vi{ will go to end of second to last line

      ✓ select (320ms)

    Transition between visual mode

      ✓ vv will back to normal mode

      ✓ vV will transit to visual line mode

      ✓ v<C-v> will transit to visual block mode

      ✓ Vv will transit to visual (char) mode

      ✓ VV will back to normal mode

      ✓ V<C-v> will transit to visual block mode

      ✓ <C-v>v will transit to visual (char) mode

      ✓ <C-v>V will back to visual line mode

      ✓ <C-v><C-v> will back to normal mode

    replace text in characterwise visual-mode with characterwise register content

      ✓ gv selects the last pasted text (which is shorter than original) (1853ms)

      ✓ gv selects the last pasted text (which is longer than original) (1848ms)

      ✓ gv selects the last pasted text (multiline) (793ms)

    can handle gn

      ✓ gn selects the next match text (938ms)

      ✓ gn selects the current word at |hello (829ms)

      ✓ gn selects the current word at h|ello (968ms)

      ✓ gn selects the current word at hel|lo (892ms)

      ✓ gn selects the next word at hell|o (909ms)

      ✓ gn selects the next word at hello| (900ms)



  Mode Visual Block

    ✓ can be activated

    ✓ Can handle A forward select (319ms)

    ✓ Can handle A backwards select (505ms)

    ✓ Can handle I forward select (335ms)

    ✓ Can handle I backwards select (380ms)

    ✓ Can handle I with empty lines on first character (inserts on empty line) (336ms)

    ✓ Can handle I with empty lines on non-first character (does not insert on empty line) (364ms)

    ✓ Can handle c forward select (318ms)

    ✓ Can handle c backwards select (395ms)

    ✓ Can handle C (398ms)

    ✓ Can do a multi line replace (404ms)

    ✓ Can handle 'D' (278ms)

    ✓ Can handle 'gj' (295ms)

    ✓ Properly add to end of lines j then $ (257ms)

    ✓ Properly add to end of lines $ then j (271ms)

    ✓ o works in visual block mode (305ms)

    Non-darwin <C-c> tests

      ✓ <C-c> copies and sets mode to normal (777ms)



  Mode Visual Line

    ✓ can be activated

    ✓ Can handle w (792ms)

    ✓ Can handle wd (640ms)

    ✓ Can handle x (472ms)

    ✓ Can handle U (492ms)

    ✓ Can handle x across a selection (569ms)

    ✓ Can do vwd in middle of sentence (736ms)

    ✓ Can do vwd in middle of sentence (627ms)

    ✓ Can do vwd multiple times (954ms)

    ✓ Can handle U across a selection (620ms)

    ✓ Can handle U across a selection in reverse order (525ms)

    ✓ handles case where we go from selecting on right side to selecting on left side (652ms)

    ✓ handles case where we delete over a newline (766ms)

    ✓ handles change operator (478ms)

    ✓ Vp updates register content (216ms)

    Vim's EOL handling is weird

      ✓ delete through eol (589ms)

      ✓ join 2 lines by deleting through eol (453ms)

      ✓ d$ doesn't delete whole line (401ms)

      ✓ vd$ does delete whole line (391ms)

    Arrow keys work perfectly in Visual Line Mode

      ✓ Can handle <up> key (212ms)

      ✓ Can handle <down> key (239ms)

    Can handle d/c correctly in Visual Line Mode

      ✓ Can handle d key (205ms)

      ✓ Can handle d key (231ms)

      ✓ Can handle d key (283ms)

      ✓ Can handle d key (270ms)

      ✓ can handle 'c' (254ms)

    handles replace in visual line mode

      ✓ Can do a single line replace (353ms)

      ✓ Can do a multi visual line replace (283ms)

      ✓ Can do a multi visual line replace from the bottom up (307ms)

    search works in visual line mode

      ✓ Works with / (219ms)

      ✓ Works with ? (294ms)

    Non-darwin <C-c> tests

      ✓ <C-c> copies and sets mode to normal (640ms)

    replace text in linewise visual-mode with linewise register content

      ✓ yyVp does not change the content but changes cursor position (175ms)

Text transformations are overlapping. Falling back to serial
           transformations. This is generally a very bad sign. Try to make
           your text transformations operate on non-overlapping ranges.

      1) linewise visual put works also in the end of document

    replace text in linewise visual-mode with linewise register content

      ✓ gv selects the last pasted text (which is shorter than original) (1544ms)

      ✓ gv selects the last pasted text (which is longer than original) (1438ms)

      ✓ gv selects the last pasted text (multiline) (674ms)



  Mode Normal

    ✓ Can handle 'x' (151ms)

Text transformations are overlapping. Falling back to serial
           transformations. This is generally a very bad sign. Try to make
           your text transformations operate on non-overlapping ranges.

    ✓ Can handle 'Nx' (201ms)

    ✓ Can handle 'x' at end of line (378ms)

Text transformations are overlapping. Falling back to serial
           transformations. This is generally a very bad sign. Try to make
           your text transformations operate on non-overlapping ranges.

    ✓ Can handle 'Ns' (206ms)

Text transformations are overlapping. Falling back to serial
           transformations. This is generally a very bad sign. Try to make
           your text transformations operate on non-overlapping ranges.

    ✓ Can handle 'Ns' at end of line (162ms)

    ✓ Can handle '<Del>' (143ms)

    ✓ Can handle '<Del>' with counts, which removes the last character of the count (107ms)

    ✓ Can handle '<Del>' at end of line (390ms)

    ✓ Can handle 'cc' (234ms)

    ✓ Can handle 'Ncc' (220ms)

    ✓ Can handle 'yy' (185ms)

    ✓ Can handle 'D' (214ms)

    ✓ Can handle 'D' on empty lines (111ms)

    ✓ Can handle 'DD' (252ms)

    ✓ Can handle 'C' (217ms)

    ✓ Can handle 'NC' (309ms)

    ✓ Can handle 'r' (179ms)

    ✓ Can handle '<Count>r' (180ms)

    ✓ Can handle '<Count>r' (287ms)

    ✓ Can handle 'r' after 'dd' (301ms)

    ✓ Can handle 'J' once (197ms)

    ✓ Can handle 'J' twice (337ms)

    ✓ Can handle 'J' with empty last line (166ms)

    ✓ Can handle 'J's with multiple empty last lines (414ms)

    ✓ Can handle 'J' with leading white space on next line (142ms)

    ✓ Can handle 'J' with only white space on next line (131ms)

    ✓ Can handle 'J' with TWO indented lines (158ms)

    ✓ Can handle 'J' with ')' first character on next line (182ms)

    ✓ Can handle 'J' with a following delete (155ms)

    ✓ Can handle 'J' in Visual Line mode (179ms)

    ✓ Can handle 'gJ' once (117ms)

    ✓ Can handle 'gJ' once and ALL WHITESPACE IS ELIMINATED (222ms)

    ✓ Can handle '~' (109ms)

    ✓ Can handle 'g~{motion}' (92ms)

    ✓ Can handle '<BS>' in insert mode (181ms)

    ✓ Can handle undo with P (292ms)



  Dot Operator

    ✓ Can repeat '~' with <num> (140ms)

    ✓ Can repeat '~' with dot (161ms)

    ✓ Can repeat 'x' (115ms)

    ✓ Can repeat 'J' (137ms)

    ✓ Can handle dot with A (326ms)

    ✓ Can handle dot with I (323ms)

    ✓ Can repeat actions that require selections (353ms)



  Repeat content change

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

    ✓ Can repeat '<C-t>' (317ms)

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

    ✓ Can repeat insert change and '<C-t>' (446ms)

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?
invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?
invalid value for set cursor position. This is probably bad?

    ✓ Can repeat change by `<C-a>` (341ms)

    ✓ Only one arrow key can be repeated in Insert Mode (319ms)

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

invalid value for set cursor position. This is probably bad?

    ✓ Cached content change will be cleared by arrow keys (329ms)



  Motions in Normal Mode

    ✓ Can handle % (88ms)

    ✓ Can handle % (179ms)

    ✓ Can handle % (84ms)

    ✓ Can handle % (82ms)

    ✓ Can handle % (88ms)

    ✓ Can handle % (256ms)

    ✓ Can handle [( (130ms)

    ✓ Can handle nested [( (132ms)

    ✓ Can handle <number>[( (148ms)

    ✓ Can handle [( and character under cursor exclusive (116ms)

    ✓ Can handle ]) (152ms)

    ✓ Can handle nested ]) (153ms)

    ✓ Can handle <number>]) (235ms)

    ✓ Can handle ]) and character under cursor exclusive (198ms)

    ✓ Can handle [{ (124ms)

    ✓ Can handle nested [{ (148ms)

    ✓ Can handle <number>[{ (156ms)

    ✓ Can handle [{ and character under cursor exclusive (120ms)

    ✓ Can handle ]} (142ms)

    ✓ Can handle nested ]} (166ms)

    ✓ Can handle <number>]} (140ms)

    ✓ Can handle ]} and character under cursor exclusive (163ms)

    ✓ Can handle 'ge' (230ms)

    ✓ Can handle 'gg' (272ms)

    ✓ Can handle 'gg' to first non blank char on random line (201ms)

    ✓ Can handle 'gg' to first non blank char on first line (145ms)

    ✓ Retain same column when moving up/down (286ms)

    ✓ Can handle <enter> (418ms)

    ✓ $ always keeps cursor on EOL (372ms)

    ✓ Can handle $ with a count (215ms)

    ✓ Can handle $ with a count at end of file (184ms)

    ✓ Can handle <end> with a count (205ms)

    ✓ Can handle <D-right> with a count (192ms)

    ✓ Can handle 'f' (260ms)

    ✓ Can handle 'f' twice (283ms)

    ✓ Can handle 'F' (274ms)

    ✓ Can handle 'F' twice (285ms)

    ✓ Can handle 't' (450ms)

    ✓ Can handle 't' twice (375ms)

    ✓ Can handle 'T' (302ms)

    ✓ Can handle 'T' twice (299ms)

    ✓ Can run a forward search (126ms)

    ✓ Can run a forward and find next search (198ms)

    ✓ Can run a reverse search (535ms)

    ✓ Can run a reverse and find next search (553ms)

    ✓ maintains column position correctly (272ms)

    ✓ maintains column position correctly with $ (191ms)

    ✓ Can handle G  (121ms)

    ✓ Can handle G with number prefix (116ms)

    ✓ Can handle G with number prefix (80ms)

    ✓ Can handle gg (128ms)

    ✓ Can handle gg with number prefix (124ms)

    ✓ Can handle dot with A (362ms)

    ✓ Can handle dot with I (550ms)

    ✓ Can handle 0 (368ms)

    ✓ Can handle 0 as part of a repeat (97ms)

    ✓ Can handle g* (141ms)

    ✓ Can handle g*n (177ms)

    ✓ Can handle * (76ms)

    ✓ Can handle ** (149ms)

    ✓ Can handle # on whitespace (417ms)

    ✓ Can handle # on EOL (569ms)

    ✓ Can handle g# (591ms)

    ✓ Can handle g#n (595ms)

    ✓ Can handle # (680ms)

    ✓ Can handle # already on the word (223ms)

    ✓ Can handle ## (525ms)

    ✓ Can handle | (658ms)

    ✓ Can handle <number> | (470ms)

    ✓ Can handle + (107ms)

    ✓ Can handle + indent (122ms)

    ✓ Can handle + with count prefix (138ms)

    ✓ Can handle - (181ms)

    ✓ Can handle - indent (131ms)

    ✓ Can handle - with count prefix (141ms)

    ✓ Can handle _ (145ms)

    ✓ Can handle _ with count prefix (203ms)

    ✓ Can handle g_ (166ms)

    ✓ Can handle g_ with count prefix (193ms)

    ✓ Can handle <up> key (198ms)

    ✓ Can handle <down> key (162ms)

    ✓ Can handle <left> key (219ms)

    ✓ Can handle <right> key (183ms)



  basic motion

    ✓ char right: should move one column right

    ✓ char right

    ✓ char left: should move cursor one column left

    ✓ char left: left-most column should stay at the same location

    ✓ line down: should move cursor one line down

    ✓ line down: bottom-most line should stay at the same location

    ✓ line begin

    ✓ line end

    ✓ document begin

    ✓ document end

    ✓ line begin cursor on first non-blank character

    ✓ last line begin cursor on first non-blank character

    line up

      ✓ should move cursor one line up

      ✓ top-most line should stay at the same location


  word motion

    ✓ line begin cursor on first non-blank character
    ✓ last line begin cursor on first non-blank character
    word right
      ✓ move to word right
      ✓ last word should move to next line
      ✓ last word should move to next line stops on empty line
      ✓ last word should move to next line skips whitespace only line
      ✓ last word on last line should go to end of document (special case!)
    word left
      ✓ move cursor word left across spaces
      ✓ move cursor word left within word
      ✓ first word should move to previous line, beginning of last word
      ✓ first word should move to previous line, stops on empty line

      ✓ first word should move to previous line, skips whitespace only line

    WORD right

      ✓ move to WORD right

      ✓ last WORD should move to next line

      ✓ last WORD should move to next line stops on empty line

      ✓ last WORD should move to next line skips whitespace only line

    WORD left

      ✓ move cursor WORD left across spaces

      ✓ move cursor WORD left within WORD

      ✓ first WORD should move to previous line, beginning of last WORD

      ✓ first WORD should move to previous line, stops on empty line

      ✓ first WORD should move to previous line, skips whitespace only line

    end of word right

      ✓ move to end of current word right

      ✓ move to end of next word right

      ✓ end of last word should move to next line

      ✓ end of last word should move to next line skips empty line

      ✓ end of last word should move to next line skips whitespace only line

    end of WORD right

      ✓ move to end of current WORD right

      ✓ move to end of next WORD right

      ✓ end of last WORD should move to next line

      ✓ end of last WORD should move to next line skips empty line

      ✓ end of last WORD should move to next line skips whitespace only line



  sentence motion

    sentence forward

      ✓ next concrete sentence

      ✓ next sentence that ends with paragraph ending

      ✓ next sentence when cursor is at the end of previous paragraph

      ✓ next sentence when paragraph contains a line of whilte spaces

    sentence backward
      ✓ current sentence begin

      ✓ sentence forward when cursor is at the beginning of the second sentence

      ✓ current sentence begin with no concrete sentense inside

      ✓ current sentence begin when it's not the same as current paragraph begin

      ✓ current sentence begin when previous line ends with a concrete sentence


  paragraph motion

    paragraph down

      ✓ move down normally
      ✓ move down longer paragraph
      ✓ move down starting inside empty line
      ✓ paragraph at end of document
    paragraph up
      ✓ move up short paragraph
      ✓ move up longer paragraph
      ✓ move up starting inside empty line



  numeric string
    ✓ fails on non-string
    ✓ handles hex round trip
    ✓ handles decimal round trip
    ✓ handles octal trip

  comment operator

    ✓ gcc comments out current line (407ms)

    ✓ gcj comments in current and next line (428ms)

    ✓ block comment with motion (1024ms)

    ✓ block comment in Visual Mode (689ms)



  put operator

    ✓ basic put test (599ms)

    ✓ test yy end of line (392ms)

    ✓ test yy first line (280ms)

    ✓ test yy middle line (294ms)

    ✓ test yy with correct positon movement (235ms)


  shift operator

    ✓ basic shift left test (374ms)

    ✓ shift left goto end test (233ms)

    ✓ shift left goto line test (269ms)

    ✓ shift right goto end test (209ms)

    ✓ shift right goto line test (190ms)



  easymotion plugin

    ✓ Can handle s move (195ms)

    ✓ Can handle 2s move (167ms)

    ✓ Can handle f move (184ms)

    ✓ Can handle 2f move (176ms)

    ✓ Can handle F move (270ms)

    ✓ Can handle 2F move (315ms)

    ✓ Can handle t move (179ms)

    ✓ Can handle bd-t move (259ms)

    ✓ Can handle 2t move (187ms)

    ✓ Can handle bd-t2 move (445ms)

    ✓ Can handle T move (335ms)

    ✓ Can handle 2T move (297ms)

    ✓ Can handle w move (250ms)

    ✓ Can handle bd-w move (218ms)

    ✓ Can handle b move (331ms)

    ✓ Can handle e move (266ms)

    ✓ Can handle bd-e move (235ms)

    ✓ Can handle ge move (301ms)

    ✓ Can handle n-char move (311ms)

    ✓ Can handle j move (166ms)

    ✓ Can handle k move (221ms)

    ✓ Can handle bd-jk move (1) (191ms)

    ✓ Can handle bd-jk move (2) (171ms)


  sneak plugin

    ✓ Can handle s motion (168ms)

    ✓ Can handle S motion (188ms)

    ✓ Can handle <operator>z motion (164ms)

    ✓ Can handle <operator>Z motion (278ms)

    ✓ Can handle s; motion (154ms)

    ✓ Can handle s, motion (299ms)

    ✓ Can handle S; motion (359ms)

    ✓ Can handle S, motion (349ms)



  surround plugin

    ✓ 'ysiw)' surrounds word without space (431ms)

    ✓ 'ysiw(' surrounds word with space (335ms)

    ✓ 'ysw)' surrounds word without space (488ms)

    ✓ 'ysw(' surrounds word with space (337ms)

    ✓ 'ysaw)' surrounds word without space (541ms)

    ✓ 'ysaw(' surrounds word with space (533ms)

    ✓ 'ysiw(' surrounds word with space and ignores punctuation (559ms)

    ✓ 'ysiw<' surrounds word with tags (482ms)

    ✓ 'ysiw<' surrounds word with tags and attributes (521ms)

    ✓ 'yss)' surrounds entire line respecting whitespace (581ms)

    ✓ change surround (454ms)

    ✓ change surround to tags (346ms)

    ✓ delete surround (512ms)

    ✓ delete surround with tags (469ms)

    ✓ change surround brackets at end of line (384ms)

    ✓ changing brackets with surround works again (312ms)



  register

    ✓ Can copy to a register (145ms)

    ✓ Can use two registers together (193ms)

    ✓ Can use black hole register (233ms)

    ✓ System clipboard works with chinese characters (257ms)

    ✓ Yank stores text in Register '0' (734ms)

    ✓ Register '1'-'9' stores delete content (679ms)

    ✓ "A appends linewise text to "a (766ms)

    ✓ "A appends character wise text to "a (809ms)

    ✓ Can put and get to register

    clipboard

      ✓ Can access '*' (clipboard) register (222ms)

      ✓ Can access '+' (clipboard) register (229ms)


  Repeatable movements with f and t

    ✓ Can repeat f<character> (165ms)

    ✓ Can repeat reversed F<character> (221ms)

    ✓ Can repeat t<character> (159ms)

    ✓ Can repeat N times reversed t<character> (158ms)


  text editor

    ✓ insert 'Hello World'

    ✓ replace 'World' with 'Foo Bar'

    ✓ delete `Hello`

    ✓ delete the whole line

    ✓ try to read lines that don't exist





  893 passing (5m)
  1 failing


  1) Mode Visual Line
       replace text in linewise visual-mode with linewise register content
         linewise visual put works also in the end of document:

      Content does not match; Expected=fun. Actual=funbaz.
      + expected - actual

      -funbaz
      +fun
      
      at Suite.suite (test/mode/modeVisualLine.test.ts:334:5)





Tests exited with code: 1

@tyru tyru force-pushed the fix-visual-block-p-at-eof branch from 97736d5 to 522060d Compare May 4, 2018 04:43
@tyru
Copy link
Contributor Author

tyru commented May 4, 2018

All tests are passed. rebased fixup commit.

However, I think visual mode put needs some refactoring.
visual mode put code is bloated, so it should be in PutCommandVisual, not PutCommand.
and PutCommandVisual should use replaceText transformation intead of insertText.
So we can implement visual block put implementation in PutCommandVisual with less effort.

How do you think? @xconverge @jpoon @Chillee

@tyru
Copy link
Contributor Author

tyru commented May 4, 2018

Like this (this is not completed change) tyru@3d74705
This refactoring makes PutCommand.exec() and PutCommandVisual.exec() reasonably short and simple.
And makes each visual mode put implementation simple.

@Chillee
Copy link
Member

Chillee commented May 4, 2018

I am totally for refactoring visual mode, and especially the put command. I took a crack at this before, but ran into a bunch of irritating corner cases.

If you can get something that looks like that and passes our test cases, I'm totally for it.

@tyru
Copy link
Contributor Author

tyru commented May 4, 2018

@Chillee Grad to hear that! I'll make a refactoring PR later :)

@jpoon
Copy link
Member

jpoon commented May 4, 2018

can you add a test for this?

@tyru tyru changed the title [Fix] p in visual block appends unnecessary newline [Fix] p in visual line appends unnecessary newline May 4, 2018
@tyru
Copy link
Contributor Author

tyru commented May 4, 2018

Added aa60a34

@jpoon jpoon merged commit efa2cc3 into VSCodeVim:master May 4, 2018
@jpoon
Copy link
Member

jpoon commented May 4, 2018

Thanks @tyru

@tyru tyru deleted the fix-visual-block-p-at-eof branch May 4, 2018 17:15
@StaverDmitry
Copy link

Just noticed it's gone, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vp appends unnecessary newline at the beginning
5 participants