@@ -413,17 +413,17 @@ def is_callable(text=""):
413413 return False
414414
415415 @Condition
416- def tac ():
417- return settings .tab_apply_completion
416+ def accot ():
417+ return settings .auto_complete_commit_on_tab
418418
419419 insert_mode = vi_insert_mode | emacs_insert_mode
420420 focused_insert = insert_mode & has_focus (DEFAULT_BUFFER )
421421 shown_not_selected = has_completions & ~ completion_is_selected
422422 alt_enter = [KeyPress (Keys .Escape ), KeyPress (Keys .Enter )]
423423
424424 # apply selected completion
425- @handle ('c-j' , filter = focused_insert & completion_is_selected & tac )
426- @handle ("enter" , filter = focused_insert & completion_is_selected & tac )
425+ @handle ('c-j' , filter = focused_insert & completion_is_selected & accot )
426+ @handle ("enter" , filter = focused_insert & completion_is_selected & accot )
427427 def _ (event ):
428428 b = event .current_buffer
429429 text = b .text
@@ -435,8 +435,8 @@ def _(event):
435435 event .cli .key_processor .feed_multiple (alt_enter )
436436
437437 # apply first completion option when completion menu is showing
438- @handle ('c-j' , filter = focused_insert & shown_not_selected & tac )
439- @handle ("enter" , filter = focused_insert & shown_not_selected & tac )
438+ @handle ('c-j' , filter = focused_insert & shown_not_selected & accot )
439+ @handle ("enter" , filter = focused_insert & shown_not_selected & accot )
440440 def _ (event ):
441441 b = event .current_buffer
442442 text = b .text
@@ -449,8 +449,8 @@ def _(event):
449449 event .cli .key_processor .feed_multiple (alt_enter )
450450
451451 # apply completion if there is only one option, otherwise start completion
452- @handle ("tab" , filter = focused_insert & ~ has_completions & tac )
453- @handle ("c-space" , filter = focused_insert & ~ has_completions & tac )
452+ @handle ("tab" , filter = focused_insert & ~ has_completions & accot )
453+ @handle ("c-space" , filter = focused_insert & ~ has_completions & accot )
454454 def _ (event ):
455455 b = event .current_buffer
456456 complete_event = CompleteEvent (completion_requested = True )
@@ -465,8 +465,8 @@ def _(event):
465465 b .start_completion (insert_common_part = True )
466466
467467 # apply first completion option if completion menu is showing
468- @handle ("tab" , filter = focused_insert & shown_not_selected & tac )
469- @handle ("c-space" , filter = focused_insert & shown_not_selected & tac )
468+ @handle ("tab" , filter = focused_insert & shown_not_selected & accot )
469+ @handle ("c-space" , filter = focused_insert & shown_not_selected & accot )
470470 def _ (event ):
471471 b = event .current_buffer
472472 b .complete_next ()
@@ -476,8 +476,8 @@ def _(event):
476476 b .cursor_left ()
477477
478478 # apply selected completion option
479- @handle ("tab" , filter = focused_insert & completion_is_selected & tac )
480- @handle ("c-space" , filter = focused_insert & completion_is_selected & tac )
479+ @handle ("tab" , filter = focused_insert & completion_is_selected & accot )
480+ @handle ("c-space" , filter = focused_insert & completion_is_selected & accot )
481481 def _ (event ):
482482 b = event .current_buffer
483483 completion = b .complete_state .current_completion
0 commit comments