mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
146670 Editing memory when memory is highlighted does not edit the address one would expect
This commit is contained in:
parent
19311472a6
commit
b30041aff3
2 changed files with 25 additions and 0 deletions
|
@ -268,6 +268,9 @@ public abstract class AbstractPane extends Canvas
|
||||||
}
|
}
|
||||||
else if(Rendering.isValidEditCharacter(ke.character))
|
else if(Rendering.isValidEditCharacter(ke.character))
|
||||||
{
|
{
|
||||||
|
if(fRendering.getSelection().hasSelection())
|
||||||
|
setCaretAddress(fRendering.getSelection().getLow());
|
||||||
|
|
||||||
editCell(fCaretAddress, fSubCellCaretPosition, ke.character);
|
editCell(fCaretAddress, fSubCellCaretPosition, ke.character);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1756,6 +1756,12 @@ class Rendering extends Composite implements IDebugEventSetListener
|
||||||
redrawPanes();
|
redrawPanes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean hasSelection()
|
||||||
|
{
|
||||||
|
return fStartHigh != null && fStartLow != null
|
||||||
|
&& fEndHigh != null && fEndLow != null;
|
||||||
|
}
|
||||||
|
|
||||||
protected boolean isSelected(BigInteger address)
|
protected boolean isSelected(BigInteger address)
|
||||||
{
|
{
|
||||||
// do we have valid start and end addresses
|
// do we have valid start and end addresses
|
||||||
|
@ -1844,6 +1850,22 @@ class Rendering extends Composite implements IDebugEventSetListener
|
||||||
redrawPanes();
|
redrawPanes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected BigInteger getHigh()
|
||||||
|
{
|
||||||
|
if(!hasSelection())
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return getStart().max(getEnd());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected BigInteger getLow()
|
||||||
|
{
|
||||||
|
if(!hasSelection())
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return getStart().min(getEnd());
|
||||||
|
}
|
||||||
|
|
||||||
protected BigInteger getStart()
|
protected BigInteger getStart()
|
||||||
{
|
{
|
||||||
// if there is no start, return null
|
// if there is no start, return null
|
||||||
|
|
Loading…
Add table
Reference in a new issue