diff options
Diffstat (limited to 'src/filebuffer.java')
| -rw-r--r-- | src/filebuffer.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/filebuffer.java b/src/filebuffer.java index 7ee27c2..ff6b225 100644 --- a/src/filebuffer.java +++ b/src/filebuffer.java @@ -19,7 +19,6 @@ public class filebuffer { readFile(); } } - /* getFileSize: gets the size of the buffer arraylist */ public int getFileSize() { return buffer.size(); @@ -33,6 +32,12 @@ public class filebuffer { /* changeCurrentLine: changes the current line value */ public void changeCurrentLine(int n) { currentLine = n; + printLine(currentLine); + } + + /* printLine: prints the line */ + private void printLine(int n) { + System.out.printf("%d %s\n", n + 1, getLine(n)); } /* getLine: returns the selected line as a string */ |
