Our sages, of blessed memory, said [at the beginning of the third chapter of Kiddushin]: A poor person who is turning over a cake and another comes and takes it is called a rasha; however, what he has done is done if he does not return it of his own accord, and beit din does not compel him regarding this. He violates a prohibition of the words of tradition that the rabbis based on a verse in Yechezkel, that one should not descend into the livelihood of his fellow. There are some of our teachers who say that this law only applies to one who is seeking to buy something or to rent it, whether land or movable property, and the same applies if he comes to hire himself out to someone or to rent out his house or his field and anything similar to this, for why should he descend into that of his fellow when he can find this in another place? But if one comes to acquire ownerless property or to receive a gift from someone and another comes and precedes him, he is not called a rasha, since this is not something available to him in another place. And there are some of our teachers who do not hold of this distinction, and in every matter he is called a rasha. Our teacher, the Rema, wrote that the first opinion appears primary. According to this view, if one comes to buy land on the border of his fellow in a place where the law of bar metzra does not apply, such as one who buys from a woman and similar cases explained in siman 175, the neighbor may precede him and buy it and is not called a rasha, for this is like a find, as it is good for a person that his fields and houses be adjacent to one another. So too, if one is about to buy something cheaply, it is like a find, and another may precede him and buy it as long as the first has not yet acquired it. And some say that the rabbis did not distinguish regarding a sale [Shach], and it is forbidden to buy, and such is the primary view, for so it implies in the Yerushalmi there. Furthermore, it is explained there that when one is negotiating a purchase, it is forbidden for another to stand over this purchase as long as the first is satisfied to buy it, and they cursed whoever does so; therefore, a person must be careful in this. It implies there that this is even if there was not yet a finalization of the price between them. Our teacher, the Rema, wrote that all this only refers to when they have already finalized the price between them and they lack nothing but the kinyan; but if they still lack the finalization, where the seller wants such an amount and the buyer wants it cheaper, it is permitted for another to buy it, whether the seller is an Israelite or not. Thus far his words. This applies to incidental matters of commerce, but in a market where many buyers and many sellers are always found, when one is negotiating a purchase, it is forbidden for another to approach this purchase as long as the first is standing over it, even when the price is not yet finalized, as the Yerushalmi wrote [it appears to me]. So is the custom in many places, that when one stands in the market to buy something, another shall not encroach upon him; it is a beautiful custom according to the law, and they are worthy of blessing. In the Perisha, he wrote that in his days they ruled regarding this that it is hasagat gevul.
אמרו חז"ל [רפ"ג דקדושין] עני המהפך בחררה ובא אחר ונטלו נקרא רשע ומה שעשה עשוי אם אין מחזירה מעצמו ואין ב"ד כופין אותו על זה ועובר על לאו דדברי קבלה דאסמכוה רבנן על קרא ביחזקאל שלא ירד לאומנות חבירו ויש מרבותינו שאומרים שאין דין זה רק במחזר אחר דבר לקנותו או לשכרו בין קרקע בין מטלטלין וה"ה אם בא להשכיר א"ע לאחד או להשכיר ביתו ושדהו וכל כיוצא בזה דלמה לו לירד לשל חבירו והרי ימצא זה במקום אחר אבל אם אחד בא לזכות בהפקר או לקבל מתנה מאחד ובא אחר וקדמו אינו נקרא רשע כיון שאין זה דבר המצוי לו במקום אחר ויש מרבותינו דלא ס"ל חילוק זה ובכל דבר נקרא רשע וכתב רבינו הרמ"א דסברא ראשונה נראה עיקר ולדעה זו אם בא אחד לקנות קרקע על מצר חבירו במקום שאין שם דינא דבר מצרא כמו בקונה מאשה וכיוצא בזה שנתבאר בסי' קע"ה יכול בעל המצר לקדמו ולקנותה ולא מקרי רשע דזהו כעין מציאה דטוב לו לאדם שיהיו שדותיו ובתיו זה אצל זה וכן אם אחד עומד לקנות דבר בזול הוי כמציאה ויוכל אחר לקדמו ולקנותו כל זמן שהראשון לא זכה בו עדיין וי"א דלא פלוג רבנן במכר [ש"ך] ואסור לקנות וכן עיקר דכן משמע בירושלמי שם ועוד מבואר שם דכשאחד עומד על המקח לקנות אסור לו לאחר לעמוד על מקח זה כל זמן שהראשון מרוצה לקנותה וקללו מי שעושה כן לכן צריך האדם ליזהר בזה ומשמע שם אפילו אם לא היה עדיין פסיקת דמים ביניהם ורבנו הרמ"א כתב דכל זה לא מיירי אלא כשכבר פסקו הדמים שביניהם ואין מחוסרין אלא קנין אבל אם מחוסרין עדיין הפסיקה שהמוכר רוצה בכך והקונה רוצה יותר בזול מותר לאחר לקנותו בין שהמוכר ישראל או לאו עכ"ל וזהו בעניני מסחר אקראי אבל בשוק שהרבה קונים והרבה מוכרים נמצאים תמיד כשאחד עומד על המקח אסור לאחר לילך על מקח זה כל זמן שהראשון עומד עליו אף כשלא פסק המקח עדיין כמ"ש הירושלמי [נ"ל] וכן המנהג בהרבה מקומות שכשאחד עומד בשוק לקנות דבר לא יסיגנו אחר ומנהג יפה הוא מדינא וראוים לברכה ובפרישה כתב שבימיו פסקו בזה שהוא הסגת גבול: