Class Nano.Buffer

java.lang.Object
org.jline.builtins.Nano.Buffer
Enclosing class:
Nano

protected class Nano.Buffer extends Object
  • Field Details

    • file

      String file
    • charset

      Charset charset
    • format

    • lines

      List<String> lines
    • firstLineToDisplay

      int firstLineToDisplay
    • firstColumnToDisplay

      int firstColumnToDisplay
    • offsetInLineToDisplay

      int offsetInLineToDisplay
    • line

      int line
    • offsets

    • offsetInLine

      int offsetInLine
    • column

      int column
    • wantedColumn

      int wantedColumn
    • uncut

      boolean uncut
    • markPos

      int[] markPos
    • syntaxHighlighter

      SyntaxHighlighter syntaxHighlighter
    • dirty

      boolean dirty
  • Constructor Details

    • Buffer

      protected Buffer(String file)
  • Method Details

    • open

      void open() throws IOException
      Throws:
      IOException
    • open

      void open(InputStream is) throws IOException
      Throws:
      IOException
    • read

      void read(InputStream fis) throws IOException
      Throws:
      IOException
    • charPosition

      private int charPosition(int displayPosition)
    • charPosition

      private int charPosition(int displayPosition, Nano.CursorMovement move)
    • charPosition

      private int charPosition(int line, int displayPosition)
    • charPosition

      private int charPosition(int line, int displayPosition, Nano.CursorMovement move)
    • blanks

      String blanks(int nb)
    • insert

      void insert(String insert)
    • computeAllOffsets

      void computeAllOffsets()
    • computeOffsets

      LinkedList<Integer> computeOffsets(String line)
    • isBreakable

      boolean isBreakable(char ch)
    • moveToChar

      void moveToChar(int pos)
    • moveToChar

      void moveToChar(int pos, Nano.CursorMovement move)
    • delete

      void delete(int count)
    • backspace

      boolean backspace(int count)
    • moveLeft

      boolean moveLeft(int chars)
    • moveRight

      boolean moveRight(int chars)
    • width

      int width()
    • moveRight

      boolean moveRight(int chars, boolean fromBeginning)
    • moveDown

      void moveDown(int lines)
    • moveUp

      void moveUp(int lines)
    • prevLineOffset

      private Optional<Integer> prevLineOffset(int line, int offsetInLine)
    • nextLineOffset

      private Optional<Integer> nextLineOffset(int line, int offsetInLine)
    • moveDisplayDown

      void moveDisplayDown(int lines)
    • moveDisplayUp

      void moveDisplayUp(int lines)
    • cursorDown

      private void cursorDown(int lines)
    • cursorUp

      private void cursorUp(int lines)
    • ensureCursorVisible

      void ensureCursorVisible()
    • eof

      void eof()
    • bof

      void bof()
    • resetDisplay

      void resetDisplay()
    • getLine

      String getLine(int line)
    • getTitle

      String getTitle()
    • computeHeader

      List<AttributedString> computeHeader()
    • highlightDisplayedLine

      void highlightDisplayedLine(int curLine, int curOffset, int nextOffset, AttributedStringBuilder line)
    • getDisplayedLines

      List<AttributedString> getDisplayedLines(int nbLines)
    • moveTo

      public void moveTo(int x, int y)
    • gotoLine

      public void gotoLine(int x, int y)
    • getDisplayedCursor

      public int getDisplayedCursor()
    • computeCursorPosition

      private int computeCursorPosition(int cursor, int rwidth)
    • getCurrentChar

      char getCurrentChar()
    • prevWord

      public void prevWord()
    • nextWord

      public void nextWord()
    • beginningOfLine

      public void beginningOfLine()
    • endOfLine

      public void endOfLine()
    • prevPage

      public void prevPage()
    • nextPage

      public void nextPage()
    • scrollUp

      public void scrollUp(int lines)
    • scrollDown

      public void scrollDown(int lines)
    • firstLine

      public void firstLine()
    • lastLine

      public void lastLine()
    • nextSearch

      boolean nextSearch()
    • doSearch

      private List<Integer> doSearch(String text)
    • highlightStart

      protected int[] highlightStart()
    • highlightEnd

      protected int[] highlightEnd()
    • matching

      public void matching()
    • length

      private int length(String line)
    • copy

      void copy()
    • cut

      void cut()
    • cut

      void cut(boolean toEnd)
    • uncut

      void uncut()
    • mark

      void mark()
    • getMarkStart

      int[] getMarkStart()
    • getMarkEnd

      int[] getMarkEnd()
    • replaceFromCursor

      void replaceFromCursor(int chars, String string)