comparison src/main.c @ 24242:d3cabf12c991 v8.2.2662

patch 8.2.2662: there is no way to avoid some escape sequences Commit: https://github.com/vim/vim/commit/7007e31bde75b6360a1b54c7572e4f855458f37d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 27 12:11:33 2021 +0100 patch 8.2.2662: there is no way to avoid some escape sequences Problem: There is no way to avoid some escape sequences. Solution: Suppress escape sequences when the --not-a-term argument is used. (Gary Johnson)
author Bram Moolenaar <Bram@vim.org>
date Sat, 27 Mar 2021 12:15:04 +0100
parents af489e854955
children 30ad18017e1c
comparison
equal deleted inserted replaced
24241:2caf37eac41b 24242:d3cabf12c991
991 */ 991 */
992 int 992 int
993 is_not_a_term() 993 is_not_a_term()
994 { 994 {
995 return params.not_a_term; 995 return params.not_a_term;
996 }
997
998 /*
999 * Return TRUE when the --not-a-term argument was found or the GUI is in use.
1000 */
1001 static int
1002 is_not_a_term_or_gui()
1003 {
1004 return params.not_a_term
1005 #ifdef FEAT_GUI
1006 || gui.in_use
1007 #endif
1008 ;
996 } 1009 }
997 1010
998 1011
999 // When TRUE in a safe state when starting to wait for a character. 1012 // When TRUE in a safe state when starting to wait for a character.
1000 static int was_safe = FALSE; 1013 static int was_safe = FALSE;
1526 set_vim_var_type(VV_EXITING, VAR_NUMBER); 1539 set_vim_var_type(VV_EXITING, VAR_NUMBER);
1527 set_vim_var_nr(VV_EXITING, exitval); 1540 set_vim_var_nr(VV_EXITING, exitval);
1528 #endif 1541 #endif
1529 1542
1530 // Position the cursor on the last screen line, below all the text 1543 // Position the cursor on the last screen line, below all the text
1531 #ifdef FEAT_GUI 1544 if (!is_not_a_term_or_gui())
1532 if (!gui.in_use)
1533 #endif
1534 windgoto((int)Rows - 1, 0); 1545 windgoto((int)Rows - 1, 0);
1535 1546
1536 #if defined(FEAT_EVAL) || defined(FEAT_SYN_HL) 1547 #if defined(FEAT_EVAL) || defined(FEAT_SYN_HL)
1537 // Optionally print hashtable efficiency. 1548 // Optionally print hashtable efficiency.
1538 hash_debug_results(); 1549 hash_debug_results();
1638 no_wait_return = FALSE; 1649 no_wait_return = FALSE;
1639 wait_return(FALSE); 1650 wait_return(FALSE);
1640 } 1651 }
1641 1652
1642 // Position the cursor again, the autocommands may have moved it 1653 // Position the cursor again, the autocommands may have moved it
1643 #ifdef FEAT_GUI 1654 if (!is_not_a_term_or_gui())
1644 if (!gui.in_use)
1645 #endif
1646 windgoto((int)Rows - 1, 0); 1655 windgoto((int)Rows - 1, 0);
1647 1656
1648 #ifdef FEAT_JOB_CHANNEL 1657 #ifdef FEAT_JOB_CHANNEL
1649 job_stop_on_exit(); 1658 job_stop_on_exit();
1650 #endif 1659 #endif