1989 honda accord idle almost dies when put in gear,or when reved up then off accelerator

Looking to buy a nice little honda that idles good,but when you put it in gear it sounds like its going to die r.p.m.wise.Is there a sensor for that?

EX. LX, or LXi

The first two are carburated and the last, injected.

… and manual or automatic?

If it is a carburetor then it sure sounds like a bad accelerator pump. That should be a simple repair.