]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
Add empty line after last \bibitem in bibliography (#12041)
[lyx.git] / src / BufferView.cpp
index ea841a05542448807d5a7608892f03689ae6edc9..758a9928f16386fd0ec3ae0ed018fd66cf12d756 100644 (file)
@@ -50,7 +50,9 @@
 #include "insets/InsetRef.h"
 #include "insets/InsetText.h"
 
+#include "mathed/InsetMath.h"
 #include "mathed/MathData.h"
+#include "mathed/MathRow.h"
 
 #include "frontends/alert.h"
 #include "frontends/CaretGeometry.h"
@@ -351,15 +353,15 @@ int BufferView::leftMargin() const
 
 int BufferView::topMargin() const
 {
-       // original value was 20px, which is 0.2in at 100dpi
-       return zoomedPixels(20);
+       // Original value was 20px at 100dpi. For internal buffers like in
+       // advanced search and replace, a value of 5px is enough.
+       return zoomedPixels(buffer().isInternal() ? 5 : 20);
 }
 
 
 int BufferView::bottomMargin() const
 {
-       // original value was 20px, which is 0.2in at 100dpi
-       return zoomedPixels(20);
+       return topMargin();
 }