From 46d6e2582be53bd9cab3d173193efd7f8937c249 Mon Sep 17 00:00:00 2001 From: Richard Quirk Date: Mon, 28 May 2012 21:29:03 +0200 Subject: [PATCH] Join without space when next line starts with ')' In Vim, the join command does not insert white space when the next line of a join starts with a ')'. --- .../net/sourceforge/vrapper/vim/commands/JoinLinesCommand.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net.sourceforge.vrapper.core/src/net/sourceforge/vrapper/vim/commands/JoinLinesCommand.java b/net.sourceforge.vrapper.core/src/net/sourceforge/vrapper/vim/commands/JoinLinesCommand.java index 19747cfac..f0075a385 100644 --- a/net.sourceforge.vrapper.core/src/net/sourceforge/vrapper/vim/commands/JoinLinesCommand.java +++ b/net.sourceforge.vrapper.core/src/net/sourceforge/vrapper/vim/commands/JoinLinesCommand.java @@ -51,6 +51,8 @@ public static void doIt(EditorAdaptor editorAdaptor, int count, boolean isSmart) glue = ""; for (int j = 0; j < secondLine.length() && Character.isWhitespace(secondLine.charAt(j)); j++) bolOffset++; + if (modelContent.getText(bolOffset, 1).charAt(0) == ')') + glue = ""; } else glue = ""; modelContent.replace(eolOffset, bolOffset - eolOffset, glue);