diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32term.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/w32term.c b/src/w32term.c index 58ea99ff46c..62859040020 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -3478,8 +3478,25 @@ w32_set_scroll_bar_thumb (bar, portion, position, whole) | |||
| 3478 | BOOL draggingp = !NILP (bar->dragging) ? TRUE : FALSE; | 3478 | BOOL draggingp = !NILP (bar->dragging) ? TRUE : FALSE; |
| 3479 | SCROLLINFO si; | 3479 | SCROLLINFO si; |
| 3480 | 3480 | ||
| 3481 | /* Dragging the w32 scroll-bar handle in a file like INSTALL.CVS | ||
| 3482 | gives very odd scrolling behaviour with the code below which | ||
| 3483 | "only updates page size if currently dragging". The cause | ||
| 3484 | seems to be that the W32 api may "silently" adjust the thumb | ||
| 3485 | position when the thumb page is change. | ||
| 3486 | |||
| 3487 | So simply don't make any updates to the scroll-bar geometry | ||
| 3488 | while dragging. KFS 2007-02-19. */ | ||
| 3489 | |||
| 3490 | if (draggingp) | ||
| 3491 | return; | ||
| 3492 | |||
| 3481 | if (whole) | 3493 | if (whole) |
| 3482 | { | 3494 | { |
| 3495 | #if 0 | ||
| 3496 | /* This code is not used (the settings are overwritten | ||
| 3497 | immediately by the lines below it). | ||
| 3498 | Should it be used? KFS 2007-02-19. */ | ||
| 3499 | |||
| 3483 | /* Position scroll bar at rock bottom if the bottom of the | 3500 | /* Position scroll bar at rock bottom if the bottom of the |
| 3484 | buffer is visible. This avoids shinking the thumb away | 3501 | buffer is visible. This avoids shinking the thumb away |
| 3485 | to nothing if it is held at the bottom of the buffer. */ | 3502 | to nothing if it is held at the bottom of the buffer. */ |
| @@ -3489,6 +3506,7 @@ w32_set_scroll_bar_thumb (bar, portion, position, whole) | |||
| 3489 | + VERTICAL_SCROLL_BAR_MIN_HANDLE; | 3506 | + VERTICAL_SCROLL_BAR_MIN_HANDLE; |
| 3490 | sb_pos = range; | 3507 | sb_pos = range; |
| 3491 | } | 3508 | } |
| 3509 | #endif | ||
| 3492 | 3510 | ||
| 3493 | sb_page = portion * range / whole + VERTICAL_SCROLL_BAR_MIN_HANDLE; | 3511 | sb_page = portion * range / whole + VERTICAL_SCROLL_BAR_MIN_HANDLE; |
| 3494 | sb_pos = position * range / whole; | 3512 | sb_pos = position * range / whole; |