From: Charles McGarvey Date: Sat, 20 Nov 2010 07:01:50 +0000 (-0700) Subject: line-endings now correct for Windows X-Git-Tag: v0.3.1~2 X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=13cdace1459b932489b8b43885504d701643f1bd;p=chaz%2Fvimcoder line-endings now correct for Windows closes #18 --- diff --git a/src/com/dogcows/Editor.java b/src/com/dogcows/Editor.java index 2f28962..57e1b77 100644 --- a/src/com/dogcows/Editor.java +++ b/src/com/dogcows/Editor.java @@ -1,12 +1,9 @@ package com.dogcows; -import java.io.BufferedReader; import java.io.File; -import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; -import java.io.InputStream; import java.util.*; import com.topcoder.client.contestant.ProblemComponentModel; diff --git a/src/com/dogcows/Util.java b/src/com/dogcows/Util.java index 47fdd20..40303b6 100644 --- a/src/com/dogcows/Util.java +++ b/src/com/dogcows/Util.java @@ -98,7 +98,7 @@ public abstract class Util reader.close(); } - return text.toString(); + return text.toString().replaceAll("\n", System.getProperty("line.separator")); } /** @@ -132,7 +132,7 @@ public abstract class Util } } - return text.toString(); + return text.toString().replaceAll("\n", System.getProperty("line.separator")); } /** diff --git a/src/com/dogcows/VimCoder.java b/src/com/dogcows/VimCoder.java index 658bae1..21374bb 100644 --- a/src/com/dogcows/VimCoder.java +++ b/src/com/dogcows/VimCoder.java @@ -4,7 +4,6 @@ package com.dogcows; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.beans.PropertyChangeListener; import java.io.*; import java.text.SimpleDateFormat; import java.util.*;