mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-24 22:34:54 +02:00
Fix a regression that opened file is not selected
This commit is contained in:
parent
c76981421f
commit
6397ba51e6
@ -4259,20 +4259,22 @@ void Notepad_plus::changeToolBarIcons()
|
|||||||
|
|
||||||
bool Notepad_plus::switchToFile(BufferID id)
|
bool Notepad_plus::switchToFile(BufferID id)
|
||||||
{
|
{
|
||||||
|
int i = 0;
|
||||||
int iView = currentView();
|
int iView = currentView();
|
||||||
if (id == BUFFER_INVALID)
|
if (id == BUFFER_INVALID)
|
||||||
return false;
|
return false;
|
||||||
int i = _pDocTab->getIndexByBuffer(id);
|
|
||||||
if (i != -1)
|
if ((i = _pDocTab->getIndexByBuffer(id)) != -1)
|
||||||
{
|
{
|
||||||
iView = currentView();
|
iView = currentView();
|
||||||
}
|
}
|
||||||
|
else if ((i = _pNonDocTab->getIndexByBuffer(id)) != -1)
|
||||||
i = _pNonDocTab->getIndexByBuffer(id);
|
|
||||||
if (i != -1)
|
|
||||||
{
|
{
|
||||||
iView = otherView();
|
iView = otherView();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i != -1)
|
||||||
|
{
|
||||||
switchEditViewTo(iView);
|
switchEditViewTo(iView);
|
||||||
activateBuffer(id, currentView());
|
activateBuffer(id, currentView());
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user