diff --git a/NEWS.md b/NEWS.md
index 9f51aec6..afe847a0 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -7,6 +7,7 @@ Version 0.7.6
- enhancement: correctly handle auto indents for statement span many lines;
- enhancment: only use colors have good contrasts with the background in the class browser and code completion suggestion window
- fix: bottom and left panel properties not correctly saved when hiding the main window
+ - fix: When debugging, if value of the variable pointed by the mouse cursor is too long, tooltip will fill the whole screen.
Version 0.7.5
- enhancement: more accurate auto indent calculation
diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp
index fb62bc86..2e5fcc70 100644
--- a/RedPandaIDE/editor.cpp
+++ b/RedPandaIDE/editor.cpp
@@ -1506,7 +1506,13 @@ void Editor::onGutterClicked(Qt::MouseButton button, int , int , int line)
void Editor::onTipEvalValueReady(const QString &value)
{
if (mCurrentWord == mCurrentDebugTipWord) {
- QToolTip::showText(QCursor::pos(), mCurrentDebugTipWord + " = " + value );
+ QString newValue;
+ if (value.length()>100) {
+ newValue = value.left(100) + "...";
+ } else {
+ newValue = value;
+ }
+ QToolTip::showText(QCursor::pos(), mCurrentDebugTipWord + " = " + newValue);
}
disconnect(pMainWindow->debugger(), &Debugger::evalValueReady,
this, &Editor::onTipEvalValueReady);
diff --git a/RedPandaIDE/mainwindow.ui b/RedPandaIDE/mainwindow.ui
index 39aa6801..11353278 100644
--- a/RedPandaIDE/mainwindow.ui
+++ b/RedPandaIDE/mainwindow.ui
@@ -1159,6 +1159,8 @@
+
+