]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
Fix a crash when closing tabs
[lyx.git] / src / BufferView.cpp
index 9bafc8c6da1384fa57c08c4ad8b3efd8f9ec4e9f..0025277e5330406ae1d33eda3113ebf668c3884b 100644 (file)
@@ -351,15 +351,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();
 }