MCPcopy Create free account
hub / github.com/BaseXdb/basex / bol

Method bol

basex-core/src/main/java/org/basex/gui/text/TextEditor.java:307–317  ·  view source on GitHub ↗

Moves to the beginning of the line. @param select selection flag @return number of passed characters

(final boolean select)

Source from the content-addressed store, hash-verified

305 * @return number of passed characters
306 */
307 private int bol(final boolean select) {
308 if(pos == 0) {
309 if(!select) noSelect();
310 return 0;
311 }
312 final int ind = indent();
313 int c = 0;
314 do c += curr() == '\t' ? ind : 1; while(back(select) != '\n');
315 if(pos != 0 || curr() == '\n') forward(select);
316 return c;
317 }
318
319 /**
320 * Moves to the beginning of a line.

Callers 4

linesUpMethod · 0.95
linesDownMethod · 0.95
moveMethod · 0.95
selectLineMethod · 0.95

Calls 5

noSelectMethod · 0.95
indentMethod · 0.95
currMethod · 0.95
backMethod · 0.95
forwardMethod · 0.95

Tested by

no test coverage detected