3341 return true; |
3464 return true; |
3342 } |
3465 } |
3343 |
3466 |
3344 protected Map<String, Widget> builtinWidgets() { |
3467 protected Map<String, Widget> builtinWidgets() { |
3345 Map<String, Widget> widgets = new HashMap<>(); |
3468 Map<String, Widget> widgets = new HashMap<>(); |
3346 widgets.put(ACCEPT_LINE, this::acceptLine); |
3469 addBuiltinWidget(widgets, ACCEPT_AND_INFER_NEXT_HISTORY, this::acceptAndInferNextHistory); |
3347 widgets.put(ARGUMENT_BASE, this::argumentBase); |
3470 addBuiltinWidget(widgets, ACCEPT_AND_HOLD, this::acceptAndHold); |
3348 widgets.put(BACKWARD_CHAR, this::backwardChar); |
3471 addBuiltinWidget(widgets, ACCEPT_LINE, this::acceptLine); |
3349 widgets.put(BACKWARD_DELETE_CHAR, this::backwardDeleteChar); |
3472 addBuiltinWidget(widgets, ACCEPT_LINE_AND_DOWN_HISTORY, this::acceptLineAndDownHistory); |
3350 widgets.put(BACKWARD_DELETE_WORD, this::backwardDeleteWord); |
3473 addBuiltinWidget(widgets, ARGUMENT_BASE, this::argumentBase); |
3351 widgets.put(BACKWARD_KILL_LINE, this::backwardKillLine); |
3474 addBuiltinWidget(widgets, BACKWARD_CHAR, this::backwardChar); |
3352 widgets.put(BACKWARD_KILL_WORD, this::backwardKillWord); |
3475 addBuiltinWidget(widgets, BACKWARD_DELETE_CHAR, this::backwardDeleteChar); |
3353 widgets.put(BACKWARD_WORD, this::backwardWord); |
3476 addBuiltinWidget(widgets, BACKWARD_DELETE_WORD, this::backwardDeleteWord); |
3354 widgets.put(BEEP, this::beep); |
3477 addBuiltinWidget(widgets, BACKWARD_KILL_LINE, this::backwardKillLine); |
3355 widgets.put(BEGINNING_OF_BUFFER_OR_HISTORY, this::beginningOfBufferOrHistory); |
3478 addBuiltinWidget(widgets, BACKWARD_KILL_WORD, this::backwardKillWord); |
3356 widgets.put(BEGINNING_OF_HISTORY, this::beginningOfHistory); |
3479 addBuiltinWidget(widgets, BACKWARD_WORD, this::backwardWord); |
3357 widgets.put(BEGINNING_OF_LINE, this::beginningOfLine); |
3480 addBuiltinWidget(widgets, BEEP, this::beep); |
3358 widgets.put(BEGINNING_OF_LINE_HIST, this::beginningOfLineHist); |
3481 addBuiltinWidget(widgets, BEGINNING_OF_BUFFER_OR_HISTORY, this::beginningOfBufferOrHistory); |
3359 widgets.put(CAPITALIZE_WORD, this::capitalizeWord); |
3482 addBuiltinWidget(widgets, BEGINNING_OF_HISTORY, this::beginningOfHistory); |
3360 widgets.put(CLEAR, this::clear); |
3483 addBuiltinWidget(widgets, BEGINNING_OF_LINE, this::beginningOfLine); |
3361 widgets.put(CLEAR_SCREEN, this::clearScreen); |
3484 addBuiltinWidget(widgets, BEGINNING_OF_LINE_HIST, this::beginningOfLineHist); |
3362 widgets.put(COMPLETE_PREFIX, this::completePrefix); |
3485 addBuiltinWidget(widgets, CAPITALIZE_WORD, this::capitalizeWord); |
3363 widgets.put(COMPLETE_WORD, this::completeWord); |
3486 addBuiltinWidget(widgets, CLEAR, this::clear); |
3364 widgets.put(COPY_PREV_WORD, this::copyPrevWord); |
3487 addBuiltinWidget(widgets, CLEAR_SCREEN, this::clearScreen); |
3365 widgets.put(COPY_REGION_AS_KILL, this::copyRegionAsKill); |
3488 addBuiltinWidget(widgets, COMPLETE_PREFIX, this::completePrefix); |
3366 widgets.put(DELETE_CHAR, this::deleteChar); |
3489 addBuiltinWidget(widgets, COMPLETE_WORD, this::completeWord); |
3367 widgets.put(DELETE_CHAR_OR_LIST, this::deleteCharOrList); |
3490 addBuiltinWidget(widgets, COPY_PREV_WORD, this::copyPrevWord); |
3368 widgets.put(DELETE_WORD, this::deleteWord); |
3491 addBuiltinWidget(widgets, COPY_REGION_AS_KILL, this::copyRegionAsKill); |
3369 widgets.put(DIGIT_ARGUMENT, this::digitArgument); |
3492 addBuiltinWidget(widgets, DELETE_CHAR, this::deleteChar); |
3370 widgets.put(DO_LOWERCASE_VERSION, this::doLowercaseVersion); |
3493 addBuiltinWidget(widgets, DELETE_CHAR_OR_LIST, this::deleteCharOrList); |
3371 widgets.put(DOWN_CASE_WORD, this::downCaseWord); |
3494 addBuiltinWidget(widgets, DELETE_WORD, this::deleteWord); |
3372 widgets.put(DOWN_LINE, this::downLine); |
3495 addBuiltinWidget(widgets, DIGIT_ARGUMENT, this::digitArgument); |
3373 widgets.put(DOWN_LINE_OR_HISTORY, this::downLineOrHistory); |
3496 addBuiltinWidget(widgets, DO_LOWERCASE_VERSION, this::doLowercaseVersion); |
3374 widgets.put(DOWN_LINE_OR_SEARCH, this::downLineOrSearch); |
3497 addBuiltinWidget(widgets, DOWN_CASE_WORD, this::downCaseWord); |
3375 widgets.put(DOWN_HISTORY, this::downHistory); |
3498 addBuiltinWidget(widgets, DOWN_LINE, this::downLine); |
3376 widgets.put(EMACS_EDITING_MODE, this::emacsEditingMode); |
3499 addBuiltinWidget(widgets, DOWN_LINE_OR_HISTORY, this::downLineOrHistory); |
3377 widgets.put(EMACS_BACKWARD_WORD, this::emacsBackwardWord); |
3500 addBuiltinWidget(widgets, DOWN_LINE_OR_SEARCH, this::downLineOrSearch); |
3378 widgets.put(EMACS_FORWARD_WORD, this::emacsForwardWord); |
3501 addBuiltinWidget(widgets, DOWN_HISTORY, this::downHistory); |
3379 widgets.put(END_OF_BUFFER_OR_HISTORY, this::endOfBufferOrHistory); |
3502 addBuiltinWidget(widgets, EMACS_EDITING_MODE, this::emacsEditingMode); |
3380 widgets.put(END_OF_HISTORY, this::endOfHistory); |
3503 addBuiltinWidget(widgets, EMACS_BACKWARD_WORD, this::emacsBackwardWord); |
3381 widgets.put(END_OF_LINE, this::endOfLine); |
3504 addBuiltinWidget(widgets, EMACS_FORWARD_WORD, this::emacsForwardWord); |
3382 widgets.put(END_OF_LINE_HIST, this::endOfLineHist); |
3505 addBuiltinWidget(widgets, END_OF_BUFFER_OR_HISTORY, this::endOfBufferOrHistory); |
3383 widgets.put(EXCHANGE_POINT_AND_MARK, this::exchangePointAndMark); |
3506 addBuiltinWidget(widgets, END_OF_HISTORY, this::endOfHistory); |
3384 widgets.put(EXPAND_HISTORY, this::expandHistory); |
3507 addBuiltinWidget(widgets, END_OF_LINE, this::endOfLine); |
3385 widgets.put(EXPAND_OR_COMPLETE, this::expandOrComplete); |
3508 addBuiltinWidget(widgets, END_OF_LINE_HIST, this::endOfLineHist); |
3386 widgets.put(EXPAND_OR_COMPLETE_PREFIX, this::expandOrCompletePrefix); |
3509 addBuiltinWidget(widgets, EXCHANGE_POINT_AND_MARK, this::exchangePointAndMark); |
3387 widgets.put(EXPAND_WORD, this::expandWord); |
3510 addBuiltinWidget(widgets, EXPAND_HISTORY, this::expandHistory); |
3388 widgets.put(FRESH_LINE, this::freshLine); |
3511 addBuiltinWidget(widgets, EXPAND_OR_COMPLETE, this::expandOrComplete); |
3389 widgets.put(FORWARD_CHAR, this::forwardChar); |
3512 addBuiltinWidget(widgets, EXPAND_OR_COMPLETE_PREFIX, this::expandOrCompletePrefix); |
3390 widgets.put(FORWARD_WORD, this::forwardWord); |
3513 addBuiltinWidget(widgets, EXPAND_WORD, this::expandWord); |
3391 widgets.put(HISTORY_INCREMENTAL_SEARCH_BACKWARD, this::historyIncrementalSearchBackward); |
3514 addBuiltinWidget(widgets, FRESH_LINE, this::freshLine); |
3392 widgets.put(HISTORY_INCREMENTAL_SEARCH_FORWARD, this::historyIncrementalSearchForward); |
3515 addBuiltinWidget(widgets, FORWARD_CHAR, this::forwardChar); |
3393 widgets.put(HISTORY_SEARCH_BACKWARD, this::historySearchBackward); |
3516 addBuiltinWidget(widgets, FORWARD_WORD, this::forwardWord); |
3394 widgets.put(HISTORY_SEARCH_FORWARD, this::historySearchForward); |
3517 addBuiltinWidget(widgets, HISTORY_INCREMENTAL_SEARCH_BACKWARD, this::historyIncrementalSearchBackward); |
3395 widgets.put(INSERT_CLOSE_CURLY, this::insertCloseCurly); |
3518 addBuiltinWidget(widgets, HISTORY_INCREMENTAL_SEARCH_FORWARD, this::historyIncrementalSearchForward); |
3396 widgets.put(INSERT_CLOSE_PAREN, this::insertCloseParen); |
3519 addBuiltinWidget(widgets, HISTORY_SEARCH_BACKWARD, this::historySearchBackward); |
3397 widgets.put(INSERT_CLOSE_SQUARE, this::insertCloseSquare); |
3520 addBuiltinWidget(widgets, HISTORY_SEARCH_FORWARD, this::historySearchForward); |
3398 widgets.put(INSERT_COMMENT, this::insertComment); |
3521 addBuiltinWidget(widgets, INSERT_CLOSE_CURLY, this::insertCloseCurly); |
3399 widgets.put(KILL_BUFFER, this::killBuffer); |
3522 addBuiltinWidget(widgets, INSERT_CLOSE_PAREN, this::insertCloseParen); |
3400 widgets.put(KILL_LINE, this::killLine); |
3523 addBuiltinWidget(widgets, INSERT_CLOSE_SQUARE, this::insertCloseSquare); |
3401 widgets.put(KILL_REGION, this::killRegion); |
3524 addBuiltinWidget(widgets, INSERT_COMMENT, this::insertComment); |
3402 widgets.put(KILL_WHOLE_LINE, this::killWholeLine); |
3525 addBuiltinWidget(widgets, KILL_BUFFER, this::killBuffer); |
3403 widgets.put(KILL_WORD, this::killWord); |
3526 addBuiltinWidget(widgets, KILL_LINE, this::killLine); |
3404 widgets.put(LIST_CHOICES, this::listChoices); |
3527 addBuiltinWidget(widgets, KILL_REGION, this::killRegion); |
3405 widgets.put(MENU_COMPLETE, this::menuComplete); |
3528 addBuiltinWidget(widgets, KILL_WHOLE_LINE, this::killWholeLine); |
3406 widgets.put(MENU_EXPAND_OR_COMPLETE, this::menuExpandOrComplete); |
3529 addBuiltinWidget(widgets, KILL_WORD, this::killWord); |
3407 widgets.put(NEG_ARGUMENT, this::negArgument); |
3530 addBuiltinWidget(widgets, LIST_CHOICES, this::listChoices); |
3408 widgets.put(OVERWRITE_MODE, this::overwriteMode); |
3531 addBuiltinWidget(widgets, MENU_COMPLETE, this::menuComplete); |
3409 // widgets.put(QUIT, this::quit); |
3532 addBuiltinWidget(widgets, MENU_EXPAND_OR_COMPLETE, this::menuExpandOrComplete); |
3410 widgets.put(QUOTED_INSERT, this::quotedInsert); |
3533 addBuiltinWidget(widgets, NEG_ARGUMENT, this::negArgument); |
3411 widgets.put(REDISPLAY, this::redisplay); |
3534 addBuiltinWidget(widgets, OVERWRITE_MODE, this::overwriteMode); |
3412 widgets.put(REDRAW_LINE, this::redrawLine); |
3535 // addBuiltinWidget(widgets, QUIT, this::quit); |
3413 widgets.put(REDO, this::redo); |
3536 addBuiltinWidget(widgets, QUOTED_INSERT, this::quotedInsert); |
3414 widgets.put(SELF_INSERT, this::selfInsert); |
3537 addBuiltinWidget(widgets, REDISPLAY, this::redisplay); |
3415 widgets.put(SELF_INSERT_UNMETA, this::selfInsertUnmeta); |
3538 addBuiltinWidget(widgets, REDRAW_LINE, this::redrawLine); |
3416 widgets.put(SEND_BREAK, this::sendBreak); |
3539 addBuiltinWidget(widgets, REDO, this::redo); |
3417 widgets.put(SET_MARK_COMMAND, this::setMarkCommand); |
3540 addBuiltinWidget(widgets, SELF_INSERT, this::selfInsert); |
3418 widgets.put(TRANSPOSE_CHARS, this::transposeChars); |
3541 addBuiltinWidget(widgets, SELF_INSERT_UNMETA, this::selfInsertUnmeta); |
3419 widgets.put(TRANSPOSE_WORDS, this::transposeWords); |
3542 addBuiltinWidget(widgets, SEND_BREAK, this::sendBreak); |
3420 widgets.put(UNDEFINED_KEY, this::undefinedKey); |
3543 addBuiltinWidget(widgets, SET_MARK_COMMAND, this::setMarkCommand); |
3421 widgets.put(UNIVERSAL_ARGUMENT, this::universalArgument); |
3544 addBuiltinWidget(widgets, TRANSPOSE_CHARS, this::transposeChars); |
3422 widgets.put(UNDO, this::undo); |
3545 addBuiltinWidget(widgets, TRANSPOSE_WORDS, this::transposeWords); |
3423 widgets.put(UP_CASE_WORD, this::upCaseWord); |
3546 addBuiltinWidget(widgets, UNDEFINED_KEY, this::undefinedKey); |
3424 widgets.put(UP_HISTORY, this::upHistory); |
3547 addBuiltinWidget(widgets, UNIVERSAL_ARGUMENT, this::universalArgument); |
3425 widgets.put(UP_LINE, this::upLine); |
3548 addBuiltinWidget(widgets, UNDO, this::undo); |
3426 widgets.put(UP_LINE_OR_HISTORY, this::upLineOrHistory); |
3549 addBuiltinWidget(widgets, UP_CASE_WORD, this::upCaseWord); |
3427 widgets.put(UP_LINE_OR_SEARCH, this::upLineOrSearch); |
3550 addBuiltinWidget(widgets, UP_HISTORY, this::upHistory); |
3428 widgets.put(VI_ADD_EOL, this::viAddEol); |
3551 addBuiltinWidget(widgets, UP_LINE, this::upLine); |
3429 widgets.put(VI_ADD_NEXT, this::viAddNext); |
3552 addBuiltinWidget(widgets, UP_LINE_OR_HISTORY, this::upLineOrHistory); |
3430 widgets.put(VI_BACKWARD_CHAR, this::viBackwardChar); |
3553 addBuiltinWidget(widgets, UP_LINE_OR_SEARCH, this::upLineOrSearch); |
3431 widgets.put(VI_BACKWARD_DELETE_CHAR, this::viBackwardDeleteChar); |
3554 addBuiltinWidget(widgets, VI_ADD_EOL, this::viAddEol); |
3432 widgets.put(VI_BACKWARD_BLANK_WORD, this::viBackwardBlankWord); |
3555 addBuiltinWidget(widgets, VI_ADD_NEXT, this::viAddNext); |
3433 widgets.put(VI_BACKWARD_BLANK_WORD_END, this::viBackwardBlankWordEnd); |
3556 addBuiltinWidget(widgets, VI_BACKWARD_CHAR, this::viBackwardChar); |
3434 widgets.put(VI_BACKWARD_KILL_WORD, this::viBackwardKillWord); |
3557 addBuiltinWidget(widgets, VI_BACKWARD_DELETE_CHAR, this::viBackwardDeleteChar); |
3435 widgets.put(VI_BACKWARD_WORD, this::viBackwardWord); |
3558 addBuiltinWidget(widgets, VI_BACKWARD_BLANK_WORD, this::viBackwardBlankWord); |
3436 widgets.put(VI_BACKWARD_WORD_END, this::viBackwardWordEnd); |
3559 addBuiltinWidget(widgets, VI_BACKWARD_BLANK_WORD_END, this::viBackwardBlankWordEnd); |
3437 widgets.put(VI_BEGINNING_OF_LINE, this::viBeginningOfLine); |
3560 addBuiltinWidget(widgets, VI_BACKWARD_KILL_WORD, this::viBackwardKillWord); |
3438 widgets.put(VI_CMD_MODE, this::viCmdMode); |
3561 addBuiltinWidget(widgets, VI_BACKWARD_WORD, this::viBackwardWord); |
3439 widgets.put(VI_DIGIT_OR_BEGINNING_OF_LINE, this::viDigitOrBeginningOfLine); |
3562 addBuiltinWidget(widgets, VI_BACKWARD_WORD_END, this::viBackwardWordEnd); |
3440 widgets.put(VI_DOWN_LINE_OR_HISTORY, this::viDownLineOrHistory); |
3563 addBuiltinWidget(widgets, VI_BEGINNING_OF_LINE, this::viBeginningOfLine); |
3441 widgets.put(VI_CHANGE, this::viChange); |
3564 addBuiltinWidget(widgets, VI_CMD_MODE, this::viCmdMode); |
3442 widgets.put(VI_CHANGE_EOL, this::viChangeEol); |
3565 addBuiltinWidget(widgets, VI_DIGIT_OR_BEGINNING_OF_LINE, this::viDigitOrBeginningOfLine); |
3443 widgets.put(VI_CHANGE_WHOLE_LINE, this::viChangeWholeLine); |
3566 addBuiltinWidget(widgets, VI_DOWN_LINE_OR_HISTORY, this::viDownLineOrHistory); |
3444 widgets.put(VI_DELETE_CHAR, this::viDeleteChar); |
3567 addBuiltinWidget(widgets, VI_CHANGE, this::viChange); |
3445 widgets.put(VI_DELETE, this::viDelete); |
3568 addBuiltinWidget(widgets, VI_CHANGE_EOL, this::viChangeEol); |
3446 widgets.put(VI_END_OF_LINE, this::viEndOfLine); |
3569 addBuiltinWidget(widgets, VI_CHANGE_WHOLE_LINE, this::viChangeWholeLine); |
3447 widgets.put(VI_KILL_EOL, this::viKillEol); |
3570 addBuiltinWidget(widgets, VI_DELETE_CHAR, this::viDeleteChar); |
3448 widgets.put(VI_FIRST_NON_BLANK, this::viFirstNonBlank); |
3571 addBuiltinWidget(widgets, VI_DELETE, this::viDelete); |
3449 widgets.put(VI_FIND_NEXT_CHAR, this::viFindNextChar); |
3572 addBuiltinWidget(widgets, VI_END_OF_LINE, this::viEndOfLine); |
3450 widgets.put(VI_FIND_NEXT_CHAR_SKIP, this::viFindNextCharSkip); |
3573 addBuiltinWidget(widgets, VI_KILL_EOL, this::viKillEol); |
3451 widgets.put(VI_FIND_PREV_CHAR, this::viFindPrevChar); |
3574 addBuiltinWidget(widgets, VI_FIRST_NON_BLANK, this::viFirstNonBlank); |
3452 widgets.put(VI_FIND_PREV_CHAR_SKIP, this::viFindPrevCharSkip); |
3575 addBuiltinWidget(widgets, VI_FIND_NEXT_CHAR, this::viFindNextChar); |
3453 widgets.put(VI_FORWARD_BLANK_WORD, this::viForwardBlankWord); |
3576 addBuiltinWidget(widgets, VI_FIND_NEXT_CHAR_SKIP, this::viFindNextCharSkip); |
3454 widgets.put(VI_FORWARD_BLANK_WORD_END, this::viForwardBlankWordEnd); |
3577 addBuiltinWidget(widgets, VI_FIND_PREV_CHAR, this::viFindPrevChar); |
3455 widgets.put(VI_FORWARD_CHAR, this::viForwardChar); |
3578 addBuiltinWidget(widgets, VI_FIND_PREV_CHAR_SKIP, this::viFindPrevCharSkip); |
3456 widgets.put(VI_FORWARD_WORD, this::viForwardWord); |
3579 addBuiltinWidget(widgets, VI_FORWARD_BLANK_WORD, this::viForwardBlankWord); |
3457 widgets.put(VI_FORWARD_WORD, this::viForwardWord); |
3580 addBuiltinWidget(widgets, VI_FORWARD_BLANK_WORD_END, this::viForwardBlankWordEnd); |
3458 widgets.put(VI_FORWARD_WORD_END, this::viForwardWordEnd); |
3581 addBuiltinWidget(widgets, VI_FORWARD_CHAR, this::viForwardChar); |
3459 widgets.put(VI_HISTORY_SEARCH_BACKWARD, this::viHistorySearchBackward); |
3582 addBuiltinWidget(widgets, VI_FORWARD_WORD, this::viForwardWord); |
3460 widgets.put(VI_HISTORY_SEARCH_FORWARD, this::viHistorySearchForward); |
3583 addBuiltinWidget(widgets, VI_FORWARD_WORD, this::viForwardWord); |
3461 widgets.put(VI_INSERT, this::viInsert); |
3584 addBuiltinWidget(widgets, VI_FORWARD_WORD_END, this::viForwardWordEnd); |
3462 widgets.put(VI_INSERT_BOL, this::viInsertBol); |
3585 addBuiltinWidget(widgets, VI_HISTORY_SEARCH_BACKWARD, this::viHistorySearchBackward); |
3463 widgets.put(VI_INSERT_COMMENT, this::viInsertComment); |
3586 addBuiltinWidget(widgets, VI_HISTORY_SEARCH_FORWARD, this::viHistorySearchForward); |
3464 widgets.put(VI_JOIN, this::viJoin); |
3587 addBuiltinWidget(widgets, VI_INSERT, this::viInsert); |
3465 widgets.put(VI_KILL_LINE, this::viKillWholeLine); |
3588 addBuiltinWidget(widgets, VI_INSERT_BOL, this::viInsertBol); |
3466 widgets.put(VI_MATCH_BRACKET, this::viMatchBracket); |
3589 addBuiltinWidget(widgets, VI_INSERT_COMMENT, this::viInsertComment); |
3467 widgets.put(VI_OPEN_LINE_ABOVE, this::viOpenLineAbove); |
3590 addBuiltinWidget(widgets, VI_JOIN, this::viJoin); |
3468 widgets.put(VI_OPEN_LINE_BELOW, this::viOpenLineBelow); |
3591 addBuiltinWidget(widgets, VI_KILL_LINE, this::viKillWholeLine); |
3469 widgets.put(VI_PUT_AFTER, this::viPutAfter); |
3592 addBuiltinWidget(widgets, VI_MATCH_BRACKET, this::viMatchBracket); |
3470 widgets.put(VI_PUT_BEFORE, this::viPutBefore); |
3593 addBuiltinWidget(widgets, VI_OPEN_LINE_ABOVE, this::viOpenLineAbove); |
3471 widgets.put(VI_REPEAT_FIND, this::viRepeatFind); |
3594 addBuiltinWidget(widgets, VI_OPEN_LINE_BELOW, this::viOpenLineBelow); |
3472 widgets.put(VI_REPEAT_SEARCH, this::viRepeatSearch); |
3595 addBuiltinWidget(widgets, VI_PUT_AFTER, this::viPutAfter); |
3473 widgets.put(VI_REPLACE_CHARS, this::viReplaceChars); |
3596 addBuiltinWidget(widgets, VI_PUT_BEFORE, this::viPutBefore); |
3474 widgets.put(VI_REV_REPEAT_FIND, this::viRevRepeatFind); |
3597 addBuiltinWidget(widgets, VI_REPEAT_FIND, this::viRepeatFind); |
3475 widgets.put(VI_REV_REPEAT_SEARCH, this::viRevRepeatSearch); |
3598 addBuiltinWidget(widgets, VI_REPEAT_SEARCH, this::viRepeatSearch); |
3476 widgets.put(VI_SWAP_CASE, this::viSwapCase); |
3599 addBuiltinWidget(widgets, VI_REPLACE_CHARS, this::viReplaceChars); |
3477 widgets.put(VI_UP_LINE_OR_HISTORY, this::viUpLineOrHistory); |
3600 addBuiltinWidget(widgets, VI_REV_REPEAT_FIND, this::viRevRepeatFind); |
3478 widgets.put(VI_YANK, this::viYankTo); |
3601 addBuiltinWidget(widgets, VI_REV_REPEAT_SEARCH, this::viRevRepeatSearch); |
3479 widgets.put(VI_YANK_WHOLE_LINE, this::viYankWholeLine); |
3602 addBuiltinWidget(widgets, VI_SWAP_CASE, this::viSwapCase); |
3480 widgets.put(VISUAL_LINE_MODE, this::visualLineMode); |
3603 addBuiltinWidget(widgets, VI_UP_LINE_OR_HISTORY, this::viUpLineOrHistory); |
3481 widgets.put(VISUAL_MODE, this::visualMode); |
3604 addBuiltinWidget(widgets, VI_YANK, this::viYankTo); |
3482 widgets.put(WHAT_CURSOR_POSITION, this::whatCursorPosition); |
3605 addBuiltinWidget(widgets, VI_YANK_WHOLE_LINE, this::viYankWholeLine); |
3483 widgets.put(YANK, this::yank); |
3606 addBuiltinWidget(widgets, VISUAL_LINE_MODE, this::visualLineMode); |
3484 widgets.put(YANK_POP, this::yankPop); |
3607 addBuiltinWidget(widgets, VISUAL_MODE, this::visualMode); |
3485 widgets.put(MOUSE, this::mouse); |
3608 addBuiltinWidget(widgets, WHAT_CURSOR_POSITION, this::whatCursorPosition); |
3486 widgets.put(BEGIN_PASTE, this::beginPaste); |
3609 addBuiltinWidget(widgets, YANK, this::yank); |
3487 widgets.put(FOCUS_IN, this::focusIn); |
3610 addBuiltinWidget(widgets, YANK_POP, this::yankPop); |
3488 widgets.put(FOCUS_OUT, this::focusOut); |
3611 addBuiltinWidget(widgets, MOUSE, this::mouse); |
|
3612 addBuiltinWidget(widgets, BEGIN_PASTE, this::beginPaste); |
|
3613 addBuiltinWidget(widgets, FOCUS_IN, this::focusIn); |
|
3614 addBuiltinWidget(widgets, FOCUS_OUT, this::focusOut); |
3489 return widgets; |
3615 return widgets; |
|
3616 } |
|
3617 |
|
3618 private void addBuiltinWidget(Map<String, Widget> widgets, String name, Widget widget) { |
|
3619 widgets.put(name, namedWidget(name, widget)); |
|
3620 } |
|
3621 |
|
3622 private Widget namedWidget(String name, Widget widget) { |
|
3623 return new Widget() { |
|
3624 @Override |
|
3625 public String toString() { |
|
3626 return name; |
|
3627 } |
|
3628 @Override |
|
3629 public boolean apply() { |
|
3630 return widget.apply(); |
|
3631 } |
|
3632 }; |
3490 } |
3633 } |
3491 |
3634 |
3492 public boolean redisplay() { |
3635 public boolean redisplay() { |
3493 redisplay(true); |
3636 redisplay(true); |
3494 return true; |
3637 return true; |
3495 } |
3638 } |
3496 |
3639 |
3497 protected synchronized void redisplay(boolean flush) { |
3640 protected void redisplay(boolean flush) { |
3498 if (skipRedisplay) { |
3641 try { |
3499 skipRedisplay = false; |
3642 lock.lock(); |
3500 return; |
3643 |
3501 } |
3644 if (skipRedisplay) { |
3502 |
3645 skipRedisplay = false; |
3503 Status status = Status.getStatus(terminal, false); |
3646 return; |
3504 if (status != null) { |
3647 } |
3505 status.redraw(); |
3648 |
3506 } |
3649 Status status = Status.getStatus(terminal, false); |
3507 |
3650 if (status != null) { |
3508 if (size.getRows() > 0 && size.getRows() < MIN_ROWS) { |
3651 status.redraw(); |
3509 AttributedStringBuilder sb = new AttributedStringBuilder().tabs(TAB_WIDTH); |
3652 } |
3510 |
3653 |
3511 sb.append(prompt); |
3654 if (size.getRows() > 0 && size.getRows() < MIN_ROWS) { |
3512 concat(getHighlightedBuffer(buf.toString()).columnSplitLength(Integer.MAX_VALUE), sb); |
3655 AttributedStringBuilder sb = new AttributedStringBuilder().tabs(TAB_WIDTH); |
3513 AttributedString full = sb.toAttributedString(); |
3656 |
3514 |
3657 sb.append(prompt); |
3515 sb.setLength(0); |
3658 concat(getHighlightedBuffer(buf.toString()).columnSplitLength(Integer.MAX_VALUE), sb); |
3516 sb.append(prompt); |
3659 AttributedString full = sb.toAttributedString(); |
3517 String line = buf.upToCursor(); |
3660 |
3518 if(maskingCallback != null) { |
|
3519 line = maskingCallback.display(line); |
|
3520 } |
|
3521 |
|
3522 concat(new AttributedString(line).columnSplitLength(Integer.MAX_VALUE), sb); |
|
3523 AttributedString toCursor = sb.toAttributedString(); |
|
3524 |
|
3525 int w = WCWidth.wcwidth('\u2026'); |
|
3526 int width = size.getColumns(); |
|
3527 int cursor = toCursor.columnLength(); |
|
3528 int inc = width /2 + 1; |
|
3529 while (cursor <= smallTerminalOffset + w) { |
|
3530 smallTerminalOffset -= inc; |
|
3531 } |
|
3532 while (cursor >= smallTerminalOffset + width - w) { |
|
3533 smallTerminalOffset += inc; |
|
3534 } |
|
3535 if (smallTerminalOffset > 0) { |
|
3536 sb.setLength(0); |
3661 sb.setLength(0); |
3537 sb.append("\u2026"); |
3662 sb.append(prompt); |
3538 sb.append(full.columnSubSequence(smallTerminalOffset + w, Integer.MAX_VALUE)); |
3663 String line = buf.upToCursor(); |
3539 full = sb.toAttributedString(); |
3664 if (maskingCallback != null) { |
3540 } |
3665 line = maskingCallback.display(line); |
3541 int length = full.columnLength(); |
3666 } |
3542 if (length >= smallTerminalOffset + width) { |
3667 |
3543 sb.setLength(0); |
3668 concat(new AttributedString(line).columnSplitLength(Integer.MAX_VALUE), sb); |
3544 sb.append(full.columnSubSequence(0, width - w)); |
3669 AttributedString toCursor = sb.toAttributedString(); |
3545 sb.append("\u2026"); |
3670 |
3546 full = sb.toAttributedString(); |
3671 int w = WCWidth.wcwidth('\u2026'); |
3547 } |
3672 int width = size.getColumns(); |
3548 |
3673 int cursor = toCursor.columnLength(); |
3549 display.update(Collections.singletonList(full), cursor - smallTerminalOffset, flush); |
3674 int inc = width / 2 + 1; |
3550 return; |
3675 while (cursor <= smallTerminalOffset + w) { |
3551 } |
3676 smallTerminalOffset -= inc; |
3552 |
3677 } |
3553 List<AttributedString> secondaryPrompts = new ArrayList<>(); |
3678 while (cursor >= smallTerminalOffset + width - w) { |
3554 AttributedString full = getDisplayedBufferWithPrompts(secondaryPrompts); |
3679 smallTerminalOffset += inc; |
3555 |
3680 } |
3556 List<AttributedString> newLines; |
3681 if (smallTerminalOffset > 0) { |
3557 if (size.getColumns() <= 0) { |
3682 sb.setLength(0); |
3558 newLines = new ArrayList<>(); |
3683 sb.append("\u2026"); |
3559 newLines.add(full); |
3684 sb.append(full.columnSubSequence(smallTerminalOffset + w, Integer.MAX_VALUE)); |
3560 } else { |
3685 full = sb.toAttributedString(); |
3561 newLines = full.columnSplitLength(size.getColumns(), true, display.delayLineWrap()); |
3686 } |
3562 } |
3687 int length = full.columnLength(); |
3563 |
3688 if (length >= smallTerminalOffset + width) { |
3564 List<AttributedString> rightPromptLines; |
3689 sb.setLength(0); |
3565 if (rightPrompt.length() == 0 || size.getColumns() <= 0) { |
3690 sb.append(full.columnSubSequence(0, width - w)); |
3566 rightPromptLines = new ArrayList<>(); |
3691 sb.append("\u2026"); |
3567 } else { |
3692 full = sb.toAttributedString(); |
3568 rightPromptLines = rightPrompt.columnSplitLength(size.getColumns()); |
3693 } |
3569 } |
3694 |
3570 while (newLines.size() < rightPromptLines.size()) { |
3695 display.update(Collections.singletonList(full), cursor - smallTerminalOffset, flush); |
3571 newLines.add(new AttributedString("")); |
3696 return; |
3572 } |
3697 } |
3573 for (int i = 0; i < rightPromptLines.size(); i++) { |
3698 |
3574 AttributedString line = rightPromptLines.get(i); |
3699 List<AttributedString> secondaryPrompts = new ArrayList<>(); |
3575 newLines.set(i, addRightPrompt(line, newLines.get(i))); |
3700 AttributedString full = getDisplayedBufferWithPrompts(secondaryPrompts); |
3576 } |
3701 |
3577 |
3702 List<AttributedString> newLines; |
3578 int cursorPos = -1; |
3703 if (size.getColumns() <= 0) { |
3579 if (size.getColumns() > 0) { |
3704 newLines = new ArrayList<>(); |
3580 AttributedStringBuilder sb = new AttributedStringBuilder().tabs(TAB_WIDTH); |
3705 newLines.add(full); |
3581 sb.append(prompt); |
3706 } else { |
3582 String buffer = buf.upToCursor(); |
3707 newLines = full.columnSplitLength(size.getColumns(), true, display.delayLineWrap()); |
3583 if (maskingCallback != null) { |
3708 } |
3584 buffer = maskingCallback.display(buffer); |
3709 |
3585 } |
3710 List<AttributedString> rightPromptLines; |
3586 sb.append(insertSecondaryPrompts(new AttributedString(buffer), secondaryPrompts, false)); |
3711 if (rightPrompt.length() == 0 || size.getColumns() <= 0) { |
3587 List<AttributedString> promptLines = sb.columnSplitLength(size.getColumns(), false, display.delayLineWrap()); |
3712 rightPromptLines = new ArrayList<>(); |
3588 if (!promptLines.isEmpty()) { |
3713 } else { |
3589 cursorPos = size.cursorPos(promptLines.size() - 1, |
3714 rightPromptLines = rightPrompt.columnSplitLength(size.getColumns()); |
3590 promptLines.get(promptLines.size() - 1).columnLength()); |
3715 } |
3591 } |
3716 while (newLines.size() < rightPromptLines.size()) { |
3592 } |
3717 newLines.add(new AttributedString("")); |
3593 |
3718 } |
3594 display.update(newLines, cursorPos, flush); |
3719 for (int i = 0; i < rightPromptLines.size(); i++) { |
|
3720 AttributedString line = rightPromptLines.get(i); |
|
3721 newLines.set(i, addRightPrompt(line, newLines.get(i))); |
|
3722 } |
|
3723 |
|
3724 int cursorPos = -1; |
|
3725 int cursorNewLinesId = -1; |
|
3726 int cursorColPos = -1; |
|
3727 if (size.getColumns() > 0) { |
|
3728 AttributedStringBuilder sb = new AttributedStringBuilder().tabs(TAB_WIDTH); |
|
3729 sb.append(prompt); |
|
3730 String buffer = buf.upToCursor(); |
|
3731 if (maskingCallback != null) { |
|
3732 buffer = maskingCallback.display(buffer); |
|
3733 } |
|
3734 sb.append(insertSecondaryPrompts(new AttributedString(buffer), secondaryPrompts, false)); |
|
3735 List<AttributedString> promptLines = sb.columnSplitLength(size.getColumns(), false, display.delayLineWrap()); |
|
3736 if (!promptLines.isEmpty()) { |
|
3737 cursorNewLinesId = promptLines.size() - 1; |
|
3738 cursorColPos = promptLines.get(promptLines.size() - 1).columnLength(); |
|
3739 cursorPos = size.cursorPos(cursorNewLinesId, cursorColPos); |
|
3740 } |
|
3741 } |
|
3742 |
|
3743 List<AttributedString> newLinesToDisplay = new ArrayList<>(); |
|
3744 int displaySize = size.getRows() - (status != null ? status.size() : 0); |
|
3745 if (newLines.size() > displaySize && !isTerminalDumb()) { |
|
3746 StringBuilder sb = new StringBuilder(">...."); |
|
3747 // blanks are needed when displaying command completion candidate list |
|
3748 for (int i = sb.toString().length(); i < size.getColumns(); i++) { |
|
3749 sb.append(" "); |
|
3750 } |
|
3751 AttributedString partialCommandInfo = new AttributedString(sb.toString()); |
|
3752 int lineId = newLines.size() - displaySize + 1; |
|
3753 int endId = displaySize; |
|
3754 int startId = 1; |
|
3755 if (lineId > cursorNewLinesId) { |
|
3756 lineId = cursorNewLinesId; |
|
3757 endId = displaySize - 1; |
|
3758 startId = 0; |
|
3759 } else { |
|
3760 newLinesToDisplay.add(partialCommandInfo); |
|
3761 } |
|
3762 int cursorRowPos = 0; |
|
3763 for (int i = startId; i < endId; i++) { |
|
3764 if (cursorNewLinesId == lineId) { |
|
3765 cursorRowPos = i; |
|
3766 } |
|
3767 newLinesToDisplay.add(newLines.get(lineId++)); |
|
3768 } |
|
3769 if (startId == 0) { |
|
3770 newLinesToDisplay.add(partialCommandInfo); |
|
3771 } |
|
3772 cursorPos = size.cursorPos(cursorRowPos, cursorColPos); |
|
3773 } else { |
|
3774 newLinesToDisplay = newLines; |
|
3775 } |
|
3776 display.update(newLinesToDisplay, cursorPos, flush); |
|
3777 } finally { |
|
3778 lock.unlock(); |
|
3779 } |
3595 } |
3780 } |
3596 |
3781 |
3597 private void concat(List<AttributedString> lines, AttributedStringBuilder sb) { |
3782 private void concat(List<AttributedString> lines, AttributedStringBuilder sb) { |
3598 if (lines.size() > 1) { |
3783 if (lines.size() > 1) { |
3599 for (int i = 0; i < lines.size() - 1; i++) { |
3784 for (int i = 0; i < lines.size() - 1; i++) { |
4046 |
4231 |
4047 // If we have no matches, bail out |
4232 // If we have no matches, bail out |
4048 if (matching.isEmpty()) { |
4233 if (matching.isEmpty()) { |
4049 return false; |
4234 return false; |
4050 } |
4235 } |
4051 |
4236 size.copy(terminal.getSize()); |
4052 // If we only need to display the list, do it now |
4237 try { |
4053 if (lst == CompletionType.List) { |
4238 // If we only need to display the list, do it now |
|
4239 if (lst == CompletionType.List) { |
|
4240 List<Candidate> possible = matching.entrySet().stream() |
|
4241 .flatMap(e -> e.getValue().stream()) |
|
4242 .collect(Collectors.toList()); |
|
4243 doList(possible, line.word(), false, line::escape); |
|
4244 return !possible.isEmpty(); |
|
4245 } |
|
4246 |
|
4247 // Check if there's a single possible match |
|
4248 Candidate completion = null; |
|
4249 // If there's a single possible completion |
|
4250 if (matching.size() == 1) { |
|
4251 completion = matching.values().stream().flatMap(Collection::stream) |
|
4252 .findFirst().orElse(null); |
|
4253 } |
|
4254 // Or if RECOGNIZE_EXACT is set, try to find an exact match |
|
4255 else if (isSet(Option.RECOGNIZE_EXACT)) { |
|
4256 completion = matching.values().stream().flatMap(Collection::stream) |
|
4257 .filter(Candidate::complete) |
|
4258 .filter(c -> exact.test(c.value())) |
|
4259 .findFirst().orElse(null); |
|
4260 } |
|
4261 // Complete and exit |
|
4262 if (completion != null && !completion.value().isEmpty()) { |
|
4263 if (prefix) { |
|
4264 buf.backspace(line.rawWordCursor()); |
|
4265 } else { |
|
4266 buf.move(line.rawWordLength() - line.rawWordCursor()); |
|
4267 buf.backspace(line.rawWordLength()); |
|
4268 } |
|
4269 buf.write(line.escape(completion.value(), completion.complete())); |
|
4270 if (completion.complete()) { |
|
4271 if (buf.currChar() != ' ') { |
|
4272 buf.write(" "); |
|
4273 } else { |
|
4274 buf.move(1); |
|
4275 } |
|
4276 } |
|
4277 if (completion.suffix() != null) { |
|
4278 redisplay(); |
|
4279 Binding op = readBinding(getKeys()); |
|
4280 if (op != null) { |
|
4281 String chars = getString(REMOVE_SUFFIX_CHARS, DEFAULT_REMOVE_SUFFIX_CHARS); |
|
4282 String ref = op instanceof Reference ? ((Reference) op).name() : null; |
|
4283 if (SELF_INSERT.equals(ref) && chars.indexOf(getLastBinding().charAt(0)) >= 0 |
|
4284 || ACCEPT_LINE.equals(ref)) { |
|
4285 buf.backspace(completion.suffix().length()); |
|
4286 if (getLastBinding().charAt(0) != ' ') { |
|
4287 buf.write(' '); |
|
4288 } |
|
4289 } |
|
4290 pushBackBinding(true); |
|
4291 } |
|
4292 } |
|
4293 return true; |
|
4294 } |
|
4295 |
4054 List<Candidate> possible = matching.entrySet().stream() |
4296 List<Candidate> possible = matching.entrySet().stream() |
4055 .flatMap(e -> e.getValue().stream()) |
4297 .flatMap(e -> e.getValue().stream()) |
4056 .collect(Collectors.toList()); |
4298 .collect(Collectors.toList()); |
4057 doList(possible, line.word(), false, line::escape); |
4299 |
4058 return !possible.isEmpty(); |
4300 if (useMenu) { |
4059 } |
4301 buf.move(line.word().length() - line.wordCursor()); |
4060 |
4302 buf.backspace(line.word().length()); |
4061 // Check if there's a single possible match |
4303 doMenu(possible, line.word(), line::escape); |
4062 Candidate completion = null; |
4304 return true; |
4063 // If there's a single possible completion |
4305 } |
4064 if (matching.size() == 1) { |
4306 |
4065 completion = matching.values().stream().flatMap(Collection::stream) |
4307 // Find current word and move to end |
4066 .findFirst().orElse(null); |
4308 String current; |
4067 } |
|
4068 // Or if RECOGNIZE_EXACT is set, try to find an exact match |
|
4069 else if (isSet(Option.RECOGNIZE_EXACT)) { |
|
4070 completion = matching.values().stream().flatMap(Collection::stream) |
|
4071 .filter(Candidate::complete) |
|
4072 .filter(c -> exact.test(c.value())) |
|
4073 .findFirst().orElse(null); |
|
4074 } |
|
4075 // Complete and exit |
|
4076 if (completion != null && !completion.value().isEmpty()) { |
|
4077 if (prefix) { |
4309 if (prefix) { |
4078 buf.backspace(line.rawWordCursor()); |
4310 current = line.word().substring(0, line.wordCursor()); |
4079 } else { |
4311 } else { |
|
4312 current = line.word(); |
4080 buf.move(line.rawWordLength() - line.rawWordCursor()); |
4313 buf.move(line.rawWordLength() - line.rawWordCursor()); |
|
4314 } |
|
4315 // Now, we need to find the unambiguous completion |
|
4316 // TODO: need to find common suffix |
|
4317 String commonPrefix = null; |
|
4318 for (String key : matching.keySet()) { |
|
4319 commonPrefix = commonPrefix == null ? key : getCommonStart(commonPrefix, key, caseInsensitive); |
|
4320 } |
|
4321 boolean hasUnambiguous = commonPrefix.startsWith(current) && !commonPrefix.equals(current); |
|
4322 |
|
4323 if (hasUnambiguous) { |
4081 buf.backspace(line.rawWordLength()); |
4324 buf.backspace(line.rawWordLength()); |
4082 } |
4325 buf.write(line.escape(commonPrefix, false)); |
4083 buf.write(line.escape(completion.value(), completion.complete())); |
4326 current = commonPrefix; |
4084 if (completion.complete()) { |
4327 if ((!isSet(Option.AUTO_LIST) && isSet(Option.AUTO_MENU)) |
4085 if (buf.currChar() != ' ') { |
4328 || (isSet(Option.AUTO_LIST) && isSet(Option.LIST_AMBIGUOUS))) { |
4086 buf.write(" "); |
4329 if (!nextBindingIsComplete()) { |
4087 } else { |
4330 return true; |
4088 buf.move(1); |
|
4089 } |
|
4090 } |
|
4091 if (completion.suffix() != null) { |
|
4092 redisplay(); |
|
4093 Binding op = readBinding(getKeys()); |
|
4094 if (op != null) { |
|
4095 String chars = getString(REMOVE_SUFFIX_CHARS, DEFAULT_REMOVE_SUFFIX_CHARS); |
|
4096 String ref = op instanceof Reference ? ((Reference) op).name() : null; |
|
4097 if (SELF_INSERT.equals(ref) && chars.indexOf(getLastBinding().charAt(0)) >= 0 |
|
4098 || ACCEPT_LINE.equals(ref)) { |
|
4099 buf.backspace(completion.suffix().length()); |
|
4100 if (getLastBinding().charAt(0) != ' ') { |
|
4101 buf.write(' '); |
|
4102 } |
|
4103 } |
4331 } |
4104 pushBackBinding(true); |
4332 } |
4105 } |
4333 } |
|
4334 if (isSet(Option.AUTO_LIST)) { |
|
4335 if (!doList(possible, current, true, line::escape)) { |
|
4336 return true; |
|
4337 } |
|
4338 } |
|
4339 if (isSet(Option.AUTO_MENU)) { |
|
4340 buf.backspace(current.length()); |
|
4341 doMenu(possible, line.word(), line::escape); |
4106 } |
4342 } |
4107 return true; |
4343 return true; |
4108 } |
4344 } finally { |
4109 |
4345 size.copy(terminal.getBufferSize()); |
4110 List<Candidate> possible = matching.entrySet().stream() |
4346 } |
4111 .flatMap(e -> e.getValue().stream()) |
|
4112 .collect(Collectors.toList()); |
|
4113 |
|
4114 if (useMenu) { |
|
4115 buf.move(line.word().length() - line.wordCursor()); |
|
4116 buf.backspace(line.word().length()); |
|
4117 doMenu(possible, line.word(), line::escape); |
|
4118 return true; |
|
4119 } |
|
4120 |
|
4121 // Find current word and move to end |
|
4122 String current; |
|
4123 if (prefix) { |
|
4124 current = line.word().substring(0, line.wordCursor()); |
|
4125 } else { |
|
4126 current = line.word(); |
|
4127 buf.move(line.rawWordLength() - line.rawWordCursor()); |
|
4128 } |
|
4129 // Now, we need to find the unambiguous completion |
|
4130 // TODO: need to find common suffix |
|
4131 String commonPrefix = null; |
|
4132 for (String key : matching.keySet()) { |
|
4133 commonPrefix = commonPrefix == null ? key : getCommonStart(commonPrefix, key, caseInsensitive); |
|
4134 } |
|
4135 boolean hasUnambiguous = commonPrefix.startsWith(current) && !commonPrefix.equals(current); |
|
4136 |
|
4137 if (hasUnambiguous) { |
|
4138 buf.backspace(line.rawWordLength()); |
|
4139 buf.write(line.escape(commonPrefix, false)); |
|
4140 current = commonPrefix; |
|
4141 if ((!isSet(Option.AUTO_LIST) && isSet(Option.AUTO_MENU)) |
|
4142 || (isSet(Option.AUTO_LIST) && isSet(Option.LIST_AMBIGUOUS))) { |
|
4143 if (!nextBindingIsComplete()) { |
|
4144 return true; |
|
4145 } |
|
4146 } |
|
4147 } |
|
4148 if (isSet(Option.AUTO_LIST)) { |
|
4149 if (!doList(possible, current, true, line::escape)) { |
|
4150 return true; |
|
4151 } |
|
4152 } |
|
4153 if (isSet(Option.AUTO_MENU)) { |
|
4154 buf.backspace(current.length()); |
|
4155 doMenu(possible, line.word(), line::escape); |
|
4156 } |
|
4157 return true; |
|
4158 } |
4347 } |
4159 |
4348 |
4160 private CompletingParsedLine wrap(ParsedLine line) { |
4349 private CompletingParsedLine wrap(ParsedLine line) { |
4161 if (line instanceof CompletingParsedLine) { |
4350 if (line instanceof CompletingParsedLine) { |
4162 return (CompletingParsedLine) line; |
4351 return (CompletingParsedLine) line; |