Monday, November 23, 2009

Microsoft Notepad Bug

In my probing of Notepad I've found a bug in the Find dialog:

OS: Windows XP SP 3 (Version 5.1.2600)
In the Find dialog box it allows one to enter a number of characters (unlimited?). However it only looks at the first 128 characters entered in the Find box. This could be misleading when somebody pastes a long string into the find dialog box. Additionally, when you reach the end of the search, when it prints out the string it cannot find it mentions only the first 128 characters. Find only does search for the first 128 characters, but it doesn't explicitly make it clear.

Below is an example when I tried entering 128 characters of 'a' then typing in 'ignored'. The image show how 'ignored' is not part of the search: finds the first 128 characters and when at the end of the find it displays that it cannot find the only the first 128 characters of the find string.


Thoughts & Fixes:
  1. Allow only 128 characters to be entered into the Find text box.
  2. When more than 128 characters get pasted into the Find text box have a message bubble explaining that the text was truncated.
  3. Notepad++ seems to suffer from a similar issue in not explicitly making the user aware that its only searching for only first number of characters. However, Notepad++ actually cuts the string off after you execute the search, which implicitly tells the user that only the first number of characters were searched. Notepad only does this after you perform the search, close the Find dialog and reopen it, does it cut off the find string.

No comments:

Post a Comment