This was a television film that aired originally in 2007. It has also been entitled Enemy Within.
The synopsis below is quite long and the last paragraph is the one that contains the details you remember but it all ties together so seems relevant to add everything in. Emphasis mine for the parts that match your description.
A young girl, Amy Tolliver (Mae Whitman), is visiting her grandmother's cabin in a forested mountain area of Maine. Amy has developed a degenerative eye disease that has made her completely blind, and she is trying to cope with her recent handicap. When her boyfriend, David (Matthew Smalley), leaves for supplies, she is left alone. A heavy storm develops and two escaped convicts, Roy (Jason Gray-Stanford and Jared Teach Grant) come to the isolated cabin. Amy must try to outwit the two convicts in order to survive.[1] After Amy drops several clues over phone calls to both her boyfriend and the police, a police officer arrives at the cabin, just as Amy discovers her grandmother dead in the bathtub. However, Roy shoots the police officer and Amy is in peril once more when Roy cannot escape in the police car. One of the other convicts, Jared arrives just after Amy tricks Roy into going into the log store and locks him in, and takes her back into the house, pretending to be a police officer.
Meanwhile, Amy's boyfriend is making his way to the cabin, having had to leave his car because of a fallen tree, and the police aren't far behind. The police discover that the two convicts who are still roaming around are brothers, in prison for armed robbery and murder. Amy almost manages to convince Jared that Roy has moved on, until Roy fires a gun at the lock on the store, alerting Jared, who was about to drive off. Amy also hears the gunshots, and tries to escape, but the brothers catch her. She tries to play them off against each other, telling Jared that Roy was going to leave without him, but it doesn't work.
David arrives at the cabin just as the brothers are about to shoot her. David shuts the electricity off and Roy misses the shot, saving Amy's life. The brothers try to find Amy, realising that they haven't killed her, but while they can't see her, Amy uses her other senses to navigate, evading them. Amy hits Jared with a fire poker, knocking him out, while David tries to attack Roy. Roy catches him and holds him at gunpoint, telling Amy to come out or he'll kill David. He shoots David in the leg and knocks him unconscious. Amy picks up Jared's gun, and the two try to navigate in the darkness and find the other. Roy accidentally shoots Jared, thinking that he's Amy, and Jared dies in his arms. Amy hides upstairs and Roy angrily pursues her, as the police arrive. Amy loads Jared's gun with bullets just as Roy climbs the stairs, and shoots him in the chest just as he prepares to shoot her. However, it isn't fatal, and Roy tries to shoot her again, but the Sheriff shoots him from downstairs. Amy rides off in the ambulance with David.
Wikipedia, Lost in the Dark (2007 film)