This repository was archived by the owner on Apr 1, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
browser/src/Editor/NeovimEditor Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,10 @@ export class NeovimEditorCommands {
7474 await neovimInstance . command ( 'let b:oniclipboard=@"' )
7575 await neovimInstance . command ( `let @"='${ sanitizedTextLines } '` )
7676
77- if ( editorManager . activeEditor . mode === "insert" ) {
77+ if (
78+ editorManager . activeEditor . mode === "insert" ||
79+ editorManager . activeEditor . mode === "cmdline_normal"
80+ ) {
7881 await neovimInstance . command ( "set paste" )
7982 await neovimInstance . input ( '<c-r>"' )
8083 await neovimInstance . command ( "set nopaste" )
Original file line number Diff line number Diff line change 55 */
66import * as assert from "assert"
77import * as Oni from "oni-api"
8-
9- import { createNewFile , getTemporaryFilePath , navigateToFile } from "./Common"
8+ import {
9+ createNewFile ,
10+ getElementByClassName ,
11+ getTemporaryFilePath ,
12+ navigateToFile ,
13+ } from "./Common"
1014
1115export const test = async ( oni : Oni . Plugin . Api ) => {
1216 const filePath = createLargeTestFile ( )
@@ -49,6 +53,14 @@ export const test = async (oni: Oni.Plugin.Api) => {
4953 firstLine ,
5054 "thithiss is a line of 'text' that will be repeated a bunch of times to make for a large wall of 'text' to paste" ,
5155 )
56+
57+ // type ':' and paste the text into the command line
58+ oni . automation . sendKeys ( ":" )
59+ await oni . automation . waitFor ( ( ) => oni . editors . activeEditor . mode === "cmdline_normal" )
60+ await paste ( oni , ( ) => {
61+ const commandLine = getElementByClassName ( "command-line" )
62+ return commandLine && commandLine . textContent === ":this"
63+ } )
5264}
5365
5466import * as fs from "fs"
You can’t perform that action at this time.
0 commit comments