Compare commits

...

8 Commits

Author SHA1 Message Date
ASU
c8cebb921e Added Ctrl+Shift+M default hotkey for Switch Terminal Input Mode 2025-04-08 00:10:41 +02:00
ASU
c5bf0fc82d Added switch terminal input mode HotKey 2025-04-08 00:10:41 +02:00
Leonid Mashinskiy
a06265da2a Fix crash on startup due memory double-free.
Introduced in 93bbf6a42b87bd19c2e8374b52813e2b80bd3b7d
2025-04-08 00:02:42 +02:00
Johannes Altmanninger
389f78f20d Do not interpret "CSI = u" and "CSI ? u" as DECRC
Unfortunately fish shell version 4 is broken on ConEmu due to the
use of sequences like

    printf '\x1b[=5u'
    printf '\x1b[?u'

used for the kitty keyboard protocol.

ConEmu treats them like "CSI u" (restore cursor position).

Fix that.

Untested -- I haven't built ConEmu yet, I don't know much
about Windows and I don't know if it's still maintained.
But I'll be happy to test.
2025-04-07 23:32:16 +02:00
Maximus5
740b09c363 Merge branch 'daily' 2023-07-24 02:05:45 +02:00
Maximus5
90f76807d5 230724 release files 2023-07-24 02:03:35 +02:00
Maximus5
bd4489e48b 230724 Chocolatey and Nuget 2023-07-24 02:03:33 +02:00
Maximus5
bf2f25300c Internal. Fix deploy script 2023-07-24 01:57:30 +02:00
12 changed files with 40 additions and 9 deletions

2
Deploy/.gitignore vendored
View File

@ -19,3 +19,5 @@ user_env.cmd
downloads-*.txt
downloads-*.json
.idea

View File

@ -9,7 +9,9 @@ if exist "%~dp0user_env.cmd" (
)
set ex7zlist=-x!*.7z -x!*.aps -x!*.bak -x!*.bdf -x!*.cache -x!*.cod -x!.codeblocks -x!*.exp -x!*.gz -x!*.hab -x!*.ilk -x!*.ipch -x!*.lib -x!*.log -x!*.msi -x!*.ncb -x!*.new -x!*.obj -x!*.opt -x!*.pdb -x!*.plg -x!*.plog -x!*.psess -x!*.pvd -x!*.sln.cache -x!*.suo -x!*.tgz -x!*.ttf -x!*.user -x!*.vsp -x!*.zip -x!*684.* -x!*sdf -x!.gitignore -x!.svn -x!curl-7.21.4 -x!Debug -x!enc_temp_folder -x!enc_temp_folder -x!gcc -x!kl_parts_gcc.* -x!makefile_lt_vc -x!MouseWheelTilt.reg -x!rebar.bmp -x!Thumbs.db -x!time2.exe -x!toolbar -x!VTune -x!WhatsNew-ConEmu-Portable.txt -x!PortableApps_Installer -x!UnitTests.cmd -x!.svnignore -x!*.o -x!!*.txt -x!*.VC.db
set ex7zpack=-x!ConEmu.Gui.map -x!ConEmu64.Gui.map -x!ConEmu\*.map -x!ConEmu\ConEmu.Addons -x!ConEmu\Portable -x!UnitTests -x!Logs -x!*.VC.db -x!far
set ex7zpack=-x!ConEmu.Gui.map -x!ConEmu64.Gui.map -x!ConEmu\*.map -x!ConEmu\ConEmu.Addons -x!ConEmu\Portable -x!UnitTests -x!Logs -x!Descript.ion -x!*.VC.db -x!Tests_*.exe -x!far
rem ex7zpack changes should be placed in deploy.cmd and Deploy_git.cmd
setlocal
set ConEmuHooks=OFF
@ -71,7 +73,9 @@ rem if exist ConEmu.map (
rem if exist ConEmu1.map del ConEmu1.map
rem ren ConEmu.map ConEmu1.map
rem )
echo on
7z a -r -mx=9 -ms=255f64m "%ConEmuPack_7z%" ConEmu*.exe ConEmu*.map ConEmu\* plugins\* %ex7zlist% %ex7zpack%
@echo off
if errorlevel 1 goto err7z
rem if exist ConEmu1.map ren ConEmu1.map ConEmu.map
cd ..

View File

@ -1,6 +1,6 @@
$package = 'ConEmu'
$version = '23.07.24'
$sha256 = '0262DC69871B0270147173847619FC2DC9A0188754474C7BA1E0BBDDBD4E4974'
$sha256 = '2A56EDD5515DDD916410DE3D84E00069CE07566B2F81C612A4241A8B109D7F4C'
$isSytem32Bit = (($Env:PROCESSOR_ARCHITECTURE -eq 'x86') -and `
($Env:PROCESSOR_ARCHITEW6432 -eq $null))

View File

@ -2610,6 +2610,18 @@ CConEmuMain::~CConEmuMain()
}
#endif
void CConEmuMain::AskChangeTermMode()
{
CVConGuard VCon;
if (GetActiveVCon(&VCon) < 0)
return;
CVirtualConsole *pVCon = VCon.VCon();
CRealConsole *pRCon = pVCon->RCon();
if (!pRCon) return;
pRCon ->StartStopTermMode(tmc_TerminalType, cta_Switch);
}
void CConEmuMain::AskChangeBufferHeight()
{
CVConGuard VCon;

View File

@ -597,6 +597,7 @@ class CConEmuMain
int ActiveConNum(); // 0-based
int GetConCount(); // количество открытых консолей
void AskChangeBufferHeight();
void AskChangeTermMode();
void AskChangeAlternative();
void AttachToDialog();
void CheckFocus(LPCWSTR asFrom);

View File

@ -525,6 +525,14 @@ bool CConEmuCtrl::key_MultiBuffer(const ConEmuChord& VkState, bool TestOnly, con
return true;
}
// pRCon may be nullptr
bool CConEmuCtrl::key_SwitchTermMode(const ConEmuChord& VkState, bool TestOnly, const ConEmuHotKey* hk, CRealConsole* pRCon)
{
if (TestOnly)
return true;
gpConEmu->AskChangeTermMode();
return true;
}
// pRCon may be nullptr
bool CConEmuCtrl::key_DuplicateRoot(const ConEmuChord& VkState, bool TestOnly, const ConEmuHotKey* hk, CRealConsole* pRCon)
{

View File

@ -106,6 +106,7 @@ public:
static bool WINAPI key_MultiRecreate(const ConEmuChord& VkState, bool TestOnly, const ConEmuHotKey* hk, CRealConsole* pRCon);
static bool WINAPI key_AlternativeBuffer(const ConEmuChord& VkState, bool TestOnly, const ConEmuHotKey* hk, CRealConsole* pRCon);
static bool WINAPI key_MultiBuffer(const ConEmuChord& VkState, bool TestOnly, const ConEmuHotKey* hk, CRealConsole* pRCon);
static bool WINAPI key_SwitchTermMode(const ConEmuChord& VkState, bool TestOnly, const ConEmuHotKey* hk, CRealConsole* pRCon);
static bool WINAPI key_DuplicateRoot(const ConEmuChord& VkState, bool TestOnly, const ConEmuHotKey* hk, CRealConsole* pRCon);
static bool WINAPI key_DuplicateRootAs(const ConEmuChord& VkState, bool TestOnly, const ConEmuHotKey* hk, CRealConsole* pRCon);
static bool WINAPI key_MultiCmd(const ConEmuChord& VkState, bool TestOnly, const ConEmuHotKey* hk, CRealConsole* pRCon);

View File

@ -311,6 +311,8 @@ int ConEmuHotKeyList::AllocateHotkeys()
.SetHotKey(VK_PAUSE);
Add(vkMultiBuffer, chk_User, L"Multi.Scroll", CConEmuCtrl::key_MultiBuffer)
;
Add(vkSwitchTermMode, chk_User, L"Multi.SwitchTermMode", CConEmuCtrl::key_SwitchTermMode)
.SetHotKey('M',VK_CONTROL,VK_SHIFT);
Add(vkMultiGroup, chk_User, L"Multi.GroupInput" ).SetMacro(L"GroupInput(0)")
.SetHotKey('G', VK_APPS);
Add(vkMultiGroupAll, chk_User, L"Multi.GroupInputAll" ).SetMacro(L"GroupInput(3)")

View File

@ -408,6 +408,7 @@ static LngPredefined gsDataHints[] = {
{ vkMoveTabRight, L"Move active tab rightward" },
{ vkMultiAltCon, L"Show alternative console buffer (last command output)" },
{ vkMultiBuffer, L"Switch bufferheight mode" },
{ vkSwitchTermMode, L"Switch Terminal Input Mode" },
{ vkMultiClose, L"Close active console" },
{ vkMultiCmd, L"Create new %s console" },
{ vkMultiGroup, L"Group keyboard input for visible splits" },

View File

@ -1352,6 +1352,7 @@
#define stStartupShellGeneral 3110
#define tFarHourglass 3111
#define vkSetFocusParent 3212
#define vkSwitchTermMode 3220
#define IDC_STATIC -1
// Next default values for new objects

View File

@ -1299,13 +1299,15 @@ CSI P s @ Insert P s (Blank) Character(s) (default = 1) (ICH)
switch (Code.Action) // case sensitive
{
case L's':
// Save cursor position (can not be nested)
XTermSaveRestoreCursor(true);
if (Code.PvtLen == 0)
// Save cursor position (can not be nested)
XTermSaveRestoreCursor(true);
break;
case L'u':
// Restore cursor position
XTermSaveRestoreCursor(false);
if (Code.PvtLen == 0)
// Restore cursor position
XTermSaveRestoreCursor(false);
break;
case L'H': // Set cursor position (1-based)

View File

@ -101,9 +101,6 @@ bool SearchAppPaths(LPCWSTR asFilePath, CEStr& rsFound, const bool abSetPath, CE
rsFound.Set(pszPath);
bFound = true;
if (pszCheck != szVal)
free(pszCheck);
// The program may require additional "%PATH%". So, if allowed...
if (abSetPath)
{